assertEquals(EvictionStrategy.LIRS, c.eviction().strategy());
assertEquals(10000, c.expiration().wakeUpInterval());
assertEquals(10, c.expiration().lifespan());
assertEquals(10, c.expiration().maxIdle());
assertFalse(c.persistence().passivation());
SingleFileStoreConfiguration fileStore = (SingleFileStoreConfiguration) c.persistence().stores().get(0);
assertFalse(fileStore.fetchPersistentState());
assertEquals("path", fileStore.location());
assertFalse(fileStore.singletonStore().enabled());
assertFalse(fileStore.purgeOnStartup());
assertTrue(fileStore.preload());
assertTrue(fileStore.shared());
assertEquals(2, fileStore.async().flushLockTimeout());
assertEquals(2048, fileStore.async().modificationQueueSize());
assertEquals(20000, fileStore.async().shutdownTimeout());
assertEquals(1, fileStore.async().threadPoolSize());
assertEquals(Index.NONE, c.indexing().index());
c = cm.getCache("invalid").getCacheConfiguration();
assertEquals(CacheMode.INVALIDATION_ASYNC, c.clustering().cacheMode());
assertTrue(c.invocationBatching().enabled());
assertEquals(10, c.clustering().async().replQueueInterval());
assertEquals(1000, c.clustering().async().replQueueMaxElements());
assertTrue(c.clustering().async().asyncMarshalling());
assertTrue(c.jmxStatistics().enabled());
assertEquals(30500, c.locking().lockAcquisitionTimeout());
assertEquals(2500, c.locking().concurrencyLevel());
assertEquals(IsolationLevel.READ_COMMITTED, c.locking().isolationLevel()); // Converted to READ_COMMITTED by builder
assertTrue(c.locking().useLockStriping());
assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Non XA
assertTrue(c.transaction().useSynchronization()); // Non XA
assertFalse(c.transaction().recovery().enabled()); // Non XA
assertTrue(c.transaction().syncCommitPhase()); // Non XA - default configuration value
assertTrue(c.transaction().syncRollbackPhase()); // Non XA - side effect of cache manager creation
assertEquals(LockingMode.OPTIMISTIC, c.transaction().lockingMode());
assertEquals(60500, c.transaction().cacheStopTimeout());
assertEquals(20500, c.eviction().maxEntries());
assertEquals(EvictionStrategy.LRU, c.eviction().strategy());
assertEquals(10500, c.expiration().wakeUpInterval());
assertEquals(11, c.expiration().lifespan());
assertEquals(11, c.expiration().maxIdle());
assertEquals(Index.NONE, c.indexing().index());
c = cm.getCache("repl").getCacheConfiguration();
assertEquals(CacheMode.REPL_ASYNC, c.clustering().cacheMode());
assertTrue(c.invocationBatching().enabled());
assertEquals(11, c.clustering().async().replQueueInterval());
assertEquals(1500, c.clustering().async().replQueueMaxElements());
assertFalse(c.clustering().async().asyncMarshalling());
assertTrue(c.jmxStatistics().enabled());
assertEquals(31000, c.locking().lockAcquisitionTimeout());
assertEquals(3000, c.locking().concurrencyLevel());
assertEquals(IsolationLevel.REPEATABLE_READ, c.locking().isolationLevel()); // Converted to REPEATABLE_READ by builder
assertTrue(c.locking().useLockStriping());
assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Batching, non XA
assertTrue(c.transaction().useSynchronization()); // Batching, non XA
assertFalse(c.transaction().recovery().enabled()); // Batching, non XA
assertTrue(c.transaction().syncCommitPhase()); // Batching, non XA - default configuration value
assertTrue(c.transaction().syncRollbackPhase()); // Batching, non XA - side effect of cache manager creation
assertEquals(LockingMode.PESSIMISTIC, c.transaction().lockingMode());
assertEquals(61000, c.transaction().cacheStopTimeout());
assertEquals(21000, c.eviction().maxEntries());
assertEquals(EvictionStrategy.FIFO, c.eviction().strategy());
assertEquals(11000, c.expiration().wakeUpInterval());
assertEquals(12, c.expiration().lifespan());
assertEquals(12, c.expiration().maxIdle());
assertFalse(c.clustering().stateTransfer().fetchInMemoryState());
assertEquals(60000, c.clustering().stateTransfer().timeout());
assertEquals(10000, c.clustering().stateTransfer().chunkSize());
ClusterLoaderConfiguration clusterLoader = (ClusterLoaderConfiguration) c.persistence().stores().get(1);
assertEquals(35000, clusterLoader.remoteCallTimeout());
assertTrue(clusterLoader.preload());
assertEquals(Index.NONE, c.indexing().index());
c = cm.getCache("dist").getCacheConfiguration();
assertEquals(CacheMode.DIST_SYNC, c.clustering().cacheMode());
assertFalse(c.invocationBatching().enabled());
assertEquals(1200000, c.clustering().l1().lifespan());
assertEquals(4, c.clustering().hash().numOwners());
assertEquals(35000, c.clustering().sync().replTimeout());
assertEquals(2, c.clustering().hash().numSegments());
assertTrue(c.clustering().hash().consistentHashFactory() instanceof SyncConsistentHashFactory);
assertFalse(c.clustering().async().asyncMarshalling());
assertTrue(c.clustering().partitionHandling().enabled());
assertTrue(c.jmxStatistics().enabled());
assertEquals(31500, c.locking().lockAcquisitionTimeout());
assertEquals(3500, c.locking().concurrencyLevel());
assertEquals(IsolationLevel.READ_COMMITTED, c.locking().isolationLevel());
assertTrue(c.locking().useLockStriping());
assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Full XA
assertFalse(c.transaction().useSynchronization()); // Full XA
assertTrue(c.transaction().recovery().enabled()); // Full XA
assertTrue(c.transaction().syncCommitPhase()); // Full XA
assertTrue(c.transaction().syncRollbackPhase()); // Full XA
assertEquals(LockingMode.OPTIMISTIC, c.transaction().lockingMode());
assertEquals(61500, c.transaction().cacheStopTimeout());
assertEquals(21500, c.eviction().maxEntries());
assertEquals(EvictionStrategy.UNORDERED, c.eviction().strategy());
assertEquals(11500, c.expiration().wakeUpInterval());
assertEquals(13, c.expiration().lifespan());
assertEquals(13, c.expiration().maxIdle());
assertTrue(c.clustering().stateTransfer().fetchInMemoryState());
assertEquals(60500, c.clustering().stateTransfer().timeout());
assertEquals(10500, c.clustering().stateTransfer().chunkSize());
// Back up cross-site configuration
BackupConfiguration backup = c.sites().allBackups().get(0);
assertEquals("NYC", backup.site());
assertEquals(BackupFailurePolicy.WARN, backup.backupFailurePolicy());
assertEquals(BackupConfiguration.BackupStrategy.SYNC, backup.strategy());
assertEquals(12500, backup.replicationTimeout());
assertFalse(backup.enabled());
backup = c.sites().allBackups().get(1);
assertEquals("SFO", backup.site());
assertEquals(BackupFailurePolicy.IGNORE, backup.backupFailurePolicy());
assertEquals(BackupConfiguration.BackupStrategy.ASYNC, backup.strategy());
assertEquals(13000, backup.replicationTimeout());
assertTrue(backup.enabled());
backup = c.sites().allBackups().get(2);
assertEquals("LON", backup.site());
assertEquals(BackupFailurePolicy.FAIL, backup.backupFailurePolicy());
assertEquals(BackupConfiguration.BackupStrategy.SYNC, backup.strategy());
assertEquals(13500, backup.replicationTimeout());
assertTrue(backup.enabled());
assertEquals(3, backup.takeOffline().afterFailures());
assertEquals(10000, backup.takeOffline().minTimeToWait());
assertEquals("users", c.sites().backupFor().remoteCache());
assertEquals("LON", c.sites().backupFor().remoteSite());
c = cm.getCache("capedwarf-data").getCacheConfiguration();
assertEquals(CacheMode.REPL_ASYNC, c.clustering().cacheMode());
assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Non XA
assertTrue(c.transaction().useSynchronization()); // Non XA
assertFalse(c.transaction().recovery().enabled()); // Non XA
assertTrue(c.transaction().syncCommitPhase()); // Non XA - default configuration value
assertTrue(c.transaction().syncRollbackPhase()); // Non XA - side effect of cache manager creation
assertEquals(EvictionStrategy.NONE, c.eviction().strategy());
assertEquals(-1, c.eviction().maxEntries());
fileStore = (SingleFileStoreConfiguration) c.persistence().stores().get(1);
assertTrue(fileStore.preload());
assertFalse(fileStore.purgeOnStartup());
c = cm.getCache("capedwarf-metadata").getCacheConfiguration();
assertEquals(CacheMode.REPL_ASYNC, c.clustering().cacheMode());
assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Non XA
assertTrue(c.transaction().useSynchronization()); // Non XA
assertFalse(c.transaction().recovery().enabled()); // Non XA
assertTrue(c.transaction().syncCommitPhase()); // Non XA - default configuration value
assertTrue(c.transaction().syncRollbackPhase()); // Non XA - side effect of cache manager creation
assertEquals(EvictionStrategy.NONE, c.eviction().strategy());
assertEquals(-1, c.eviction().maxEntries());
DummyInMemoryStoreConfiguration dummyStore = (DummyInMemoryStoreConfiguration) c.persistence().stores().get(1);
assertFalse(dummyStore.preload());
assertFalse(dummyStore.purgeOnStartup());
c = cm.getCache("capedwarf-memcache").getCacheConfiguration();
assertEquals(CacheMode.REPL_ASYNC, c.clustering().cacheMode());
assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Non XA
assertTrue(c.transaction().useSynchronization()); // Non XA
assertFalse(c.transaction().recovery().enabled()); // Non XA
assertTrue(c.transaction().syncCommitPhase()); // Non XA - default configuration value
assertTrue(c.transaction().syncRollbackPhase()); // Non XA - side effect of cache manager creation
assertEquals(EvictionStrategy.NONE, c.eviction().strategy());
assertEquals(-1, c.eviction().maxEntries());
assertEquals(LockingMode.PESSIMISTIC, c.transaction().lockingMode());
c = cm.getCache("capedwarf-default").getCacheConfiguration();
assertEquals(CacheMode.DIST_ASYNC, c.clustering().cacheMode());
assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Non XA
assertTrue(c.transaction().useSynchronization()); // Non XA
assertFalse(c.transaction().recovery().enabled()); // Non XA
assertTrue(c.transaction().syncCommitPhase()); // Non XA - default configuration value
assertTrue(c.transaction().syncRollbackPhase()); // Non XA - side effect of cache manager creation
assertEquals(EvictionStrategy.NONE, c.eviction().strategy());
assertEquals(-1, c.eviction().maxEntries());
fileStore = (SingleFileStoreConfiguration) c.persistence().stores().get(0);
assertTrue(fileStore.preload());
assertFalse(fileStore.purgeOnStartup());
assertEquals(Index.NONE, c.indexing().index());
c = cm.getCache("capedwarf-dist").getCacheConfiguration();
assertEquals(CacheMode.DIST_ASYNC, c.clustering().cacheMode());
assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Non XA
assertTrue(c.transaction().useSynchronization()); // Non XA
assertFalse(c.transaction().recovery().enabled()); // Non XA
assertTrue(c.transaction().syncCommitPhase()); // Non XA - default configuration value
assertTrue(c.transaction().syncRollbackPhase()); // Non XA - side effect of cache manager creation
assertEquals(EvictionStrategy.NONE, c.eviction().strategy());
assertEquals(-1, c.eviction().maxEntries());
assertEquals(LockingMode.PESSIMISTIC, c.transaction().lockingMode());
fileStore = (SingleFileStoreConfiguration) c.persistence().stores().get(0);
assertTrue(fileStore.preload());
assertFalse(fileStore.purgeOnStartup());
c = cm.getCache("capedwarf-tasks").getCacheConfiguration();
assertEquals(CacheMode.DIST_ASYNC, c.clustering().cacheMode());
assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Non XA
assertTrue(c.transaction().useSynchronization()); // Non XA
assertFalse(c.transaction().recovery().enabled()); // Non XA
assertTrue(c.transaction().syncCommitPhase()); // Non XA - default configuration value
assertTrue(c.transaction().syncRollbackPhase()); // Non XA - side effect of cache manager creation
assertEquals(EvictionStrategy.LIRS, c.eviction().strategy());
assertEquals(10000, c.eviction().maxEntries());
fileStore = (SingleFileStoreConfiguration) c.persistence().stores().get(1);
assertTrue(fileStore.preload());
assertFalse(fileStore.purgeOnStartup());
assertEquals(Index.NONE, c.indexing().index());
c = cm.getCache("HibernateSearch-LuceneIndexesMetadata").getCacheConfiguration();
assertEquals(CacheMode.REPL_SYNC, c.clustering().cacheMode());
assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Non XA
assertTrue(c.invocationBatching().enabled());
assertTrue(c.transaction().useSynchronization()); // Non XA
assertFalse(c.transaction().recovery().enabled()); // Non XA
assertTrue(c.transaction().syncCommitPhase()); // Non XA - default configuration value
assertTrue(c.transaction().syncRollbackPhase()); // Non XA - side effect of cache manager creation
assertEquals(EvictionStrategy.NONE, c.eviction().strategy());
assertEquals(-1, c.eviction().maxEntries());
fileStore = (SingleFileStoreConfiguration) c.persistence().stores().get(1);
assertTrue(fileStore.preload());
assertFalse(fileStore.purgeOnStartup());
c = cm.getCache("HibernateSearch-LuceneIndexesData").getCacheConfiguration();
assertEquals(CacheMode.REPL_SYNC, c.clustering().cacheMode());
assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Non XA
assertTrue(c.invocationBatching().enabled());
assertTrue(c.transaction().useSynchronization()); // Non XA
assertFalse(c.transaction().recovery().enabled()); // Non XA
assertTrue(c.transaction().syncCommitPhase()); // Non XA - default configuration value
assertTrue(c.transaction().syncRollbackPhase()); // Non XA - side effect of cache manager creation
assertEquals(EvictionStrategy.NONE, c.eviction().strategy());
assertEquals(-1, c.eviction().maxEntries());
fileStore = (SingleFileStoreConfiguration) c.persistence().stores().get(1);
assertTrue(fileStore.preload());
assertFalse(fileStore.purgeOnStartup());
c = cm.getCache("HibernateSearch-LuceneIndexesLocking").getCacheConfiguration();
assertEquals(CacheMode.REPL_SYNC, c.clustering().cacheMode());
assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Non XA
assertTrue(c.invocationBatching().enabled());