public static List createTopologyAwareCacheNodes(int numberOfNodes, CacheMode cacheMode, boolean transactional,
boolean indexLocalOnly, boolean isRamDirectoryProvider) {
List caches = new ArrayList();
ConfigurationBuilder builder = AbstractCacheTest.getDefaultClusteredCacheConfig(cacheMode, transactional);
builder.indexing().enable().indexLocalOnly(indexLocalOnly);
if(isRamDirectoryProvider) {
builder.indexing().addProperty("default.directory_provider", "ram").addProperty("lucene_version", "LUCENE_CURRENT");
} else {
builder.indexing().addProperty("hibernate.search.default.indexmanager", "org.infinispan.query.indexmanager.InfinispanIndexManager")
.addProperty("default.directory_provider", "infinispan")
.addProperty("hibernate.search.default.exclusive_index_use", "false")
.addProperty("lucene_version", "LUCENE_36");
if (cacheMode.isClustered()) {
builder.clustering().stateTransfer().fetchInMemoryState(true);
}
}
for(int i = 0; i < numberOfNodes; i++) {
GlobalConfigurationBuilder globalConfigurationBuilder = GlobalConfigurationBuilder