wrapper.setTransactionManagerLookupClass(BatchModeTransactionManagerLookup.class.getName());
wrapper.setExposeManagementStatistics(false);
wrapper.setUseRegionBasedMarshalling(true);
wrapper.setUseReplQueue(true);
Configuration c = wrapper.getConfiguration();
assertEquals("CacheMode", "REPL_SYNC", wrapper.getCacheMode());
assertEquals("CacheMode", CacheMode.REPL_SYNC, c.getCacheMode());
assertEquals("ClusterName", "LocalTest", wrapper.getClusterName());
assertEquals("ClusterName", "LocalTest", c.getClusterName());
assertEquals("FetchInMemoryState", false, wrapper.getFetchInMemoryState());
assertEquals("FetchInMemoryState", false, c.isFetchInMemoryState());
assertEquals("InitialStateRetrievalTimeout", 100, wrapper.getInitialStateRetrievalTimeout());
assertEquals("InitialStateRetrievalTimeout", 100, c.getStateRetrievalTimeout());
assertEquals("InactiveOnStartup", true, wrapper.isInactiveOnStartup());
assertEquals("InactiveOnStartup", true, c.isInactiveOnStartup());
assertEquals("NodeLockingScheme", "OPTIMISTIC", wrapper.getNodeLockingScheme());
assertEquals("NodeLockingScheme", NodeLockingScheme.OPTIMISTIC, c.getNodeLockingScheme());
assertEquals("IsolationLevel", "READ_UNCOMMITTED", wrapper.getIsolationLevel());
assertEquals("IsolationLevel", IsolationLevel.READ_UNCOMMITTED, c.getIsolationLevel());
assertEquals("LockAcquisitionTimeout", 200, wrapper.getLockAcquisitionTimeout());
assertEquals("LockAcquisitionTimeout", 200, c.getLockAcquisitionTimeout());
assertEquals("ReplicationVersion", "1.0.1", wrapper.getReplicationVersion());
assertEquals("ReplicationVersion", Version.getVersionShort("1.0.1"), c.getReplicationVersion());
assertEquals("ReplQueueInterval", 15, wrapper.getReplQueueInterval());
assertEquals("ReplQueueInterval", 15, c.getReplQueueInterval());
assertEquals("ReplQueueMaxElements", 50, wrapper.getReplQueueMaxElements());
assertEquals("ReplQueueMaxElements", 50, c.getReplQueueMaxElements());
assertEquals("SyncReplTimeout", 300, wrapper.getSyncReplTimeout());
assertEquals("SyncReplTimeout", 300, c.getSyncReplTimeout());
assertEquals("SyncCommitPhase", true, wrapper.getSyncCommitPhase());
assertEquals("SyncCommitPhase", true, c.isSyncCommitPhase());
assertEquals("SyncRollbackPhase", true, wrapper.getSyncRollbackPhase());
assertEquals("SyncRollbackPhase", true, c.isSyncRollbackPhase());
assertEquals("TransactionManagerLookupClass", BatchModeTransactionManagerLookup.class.getName(), wrapper.getTransactionManagerLookupClass());
assertEquals("TransactionManagerLookupClass", BatchModeTransactionManagerLookup.class.getName(), c.getTransactionManagerLookupClass());
assertEquals("ExposeManagementStatistics", false, wrapper.getExposeManagementStatistics());
assertEquals("ExposeManagementStatistics", false, c.getExposeManagementStatistics());
assertEquals("UseRegionBasedMarshalling", true, wrapper.getUseRegionBasedMarshalling());
assertEquals("UseRegionBasedMarshalling", true, c.isUseRegionBasedMarshalling());
assertEquals("UseReplQueue", true, wrapper.getUseReplQueue());
assertEquals("UseReplQueue", true, c.isUseReplQueue());
assertEquals("ClusterConfig", getClusterConfig().toString(), wrapper.getClusterConfig().toString());
assertEquals("BuddyReplicationConfig", getBuddyReplicationConfig(legacy).toString(), wrapper.getBuddyReplicationConfig().toString());
BuddyReplicationConfig brc = c.getBuddyReplicationConfig();
assertEquals("BR enabled", true, brc.isEnabled());
assertEquals("BR auto grav", false, brc.isAutoDataGravitation());
assertEquals("BR remove find", false, brc.isDataGravitationRemoveOnFind());
assertEquals("BR search backup", false, brc.isDataGravitationSearchBackupTrees());
assertEquals("BR comm timeout", 600000, brc.getBuddyCommunicationTimeout());
assertEquals("BR poolname", "testpool", brc.getBuddyPoolName());
BuddyLocatorConfig blc = brc.getBuddyLocatorConfig();
assertEquals("BR locator", "org.jboss.cache.buddyreplication.TestBuddyLocator", blc.getBuddyLocatorClass());
Properties props = blc.getBuddyLocatorProperties();
assertEquals("BR props", "2", props.get("numBuddies"));
assertEquals("CacheLoaderConfig", getCacheLoaderConfig(legacy).toString(), wrapper.getCacheLoaderConfig().toString());
CacheLoaderConfig clc = c.getCacheLoaderConfig();
assertEquals("CL passivation", false, clc.isPassivation());
assertEquals("CL passivation", true, clc.isShared());
assertEquals("CL preload", "/foo", clc.getPreload());
List<IndividualCacheLoaderConfig> iclcs = clc.getIndividualCacheLoaderConfigs();
IndividualCacheLoaderConfig iclc = iclcs.get(0);
assertEquals("CL0 class", FileCacheLoader.class.getName(), iclc.getClassName());
assertEquals("CL0 async", false, iclc.isAsync());
assertEquals("CL0 fetch", true, iclc.isFetchPersistentState());
assertEquals("CL0 ignore", true, iclc.isIgnoreModifications());
assertEquals("CL0 purge", true, iclc.isPurgeOnStartup());
assertEquals("CL0 singleton", true, iclc.getSingletonStoreConfig().isSingletonStoreEnabled());
assertEquals("CL0 singleton class", SingletonStoreCacheLoader.class.getName(), iclc.getSingletonStoreConfig().getSingletonStoreClass());
iclc = iclcs.get(1);
assertEquals("CL1 class", JdbmCacheLoader.class.getName(), iclc.getClassName());
assertEquals("CL1 async", true, iclc.isAsync());
assertEquals("CL1 fetch", false, iclc.isFetchPersistentState());
assertEquals("CL1 ignore", false, iclc.isIgnoreModifications());
assertEquals("CL1 purge", false, iclc.isPurgeOnStartup());
assertEquals("CL1 singleton", false, iclc.getSingletonStoreConfig().isSingletonStoreEnabled());
assertEquals("CL1 singleton class", SingletonStoreCacheLoader.class.getName(), iclc.getSingletonStoreConfig().getSingletonStoreClass());
assertEquals("EvictionPolicyConfig", getEvictionPolicyConfig(legacy).toString(), wrapper.getEvictionPolicyConfig().toString());
EvictionConfig ec = c.getEvictionConfig();
assertEquals("EC queue size", 1000, ec.getDefaultEvictionRegionConfig().getEventQueueSize());
assertEquals("EC wakeup", 5000, ec.getWakeupInterval());
assertEquals("EC default pol", LRUAlgorithm.class.getName(), ec.getDefaultEvictionRegionConfig().getEvictionAlgorithmConfig().getEvictionAlgorithmClassName());
List<EvictionRegionConfig> ercs = ec.getEvictionRegionConfigs();
EvictionRegionConfig erc = ercs.get(0);