@Override public void accept(ConfigurationBuilder builder) { super.accept(builder); builder.clustering() .hash().capacityFactor(this.capacityFactor).numOwners(this.owners) .l1().enabled(this.l1Lifespan > 0).lifespan(this.l1Lifespan) ; } }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder dcc = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true); dcc.clustering().l1().disable().hash().numOwners(1); createCluster(dcc, 2); waitForClusterToForm(); }
private static ConfigurationBuilder createConfiguration() { ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, false); builder.clustering().hash().numOwners(2); return builder; }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder config = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, transactional); config.clustering().l1().enable().hash().numOwners(1); createCluster(config, 2); waitForClusterToForm(); k0 = getKeyForCache(0); }
@Override protected void createCacheManagers() throws Throwable { c = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true); c .transaction() .lockingMode(LockingMode.PESSIMISTIC) .transactionManagerLookup(new EmbeddedTransactionManagerLookup()) .clustering() .hash().numOwners(3); createCluster(c, 2); waitForClusterToForm(); }
private static ConfigurationBuilder createConfiguration() { ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, false); builder.clustering().hash().numOwners(2); return builder; }
private ConfigurationBuilder configuration() { ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, true); builder.clustering() .stateTransfer().fetchInMemoryState(true) .hash().numSegments(1).numOwners(3).consistentHashFactory(new ConsistentHashFactoryImpl()); builder.locking().isolationLevel(IsolationLevel.REPEATABLE_READ); return builder; }
@Override protected void createCacheManagers() throws Throwable { final ConfigurationBuilder c = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true); c .transaction().lockingMode(LockingMode.PESSIMISTIC) .clustering() .hash().numOwners(1) .l1().disable(); createCluster(c, 2); waitForClusterToForm(); k1 = getKeyForCache(1); commandFactory = ControlledCommandFactory.registerControlledCommandFactory(cache(1), CommitCommand.class); }
@Override protected void applyCacheManagerClusteringConfiguration(ConfigurationBuilder config) { config.clustering().cacheMode(CacheMode.DIST_SYNC).hash().numOwners(1); }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true); builder.transaction() .transactionManagerLookup(new EmbeddedTransactionManagerLookup()) .useSynchronization(false) .recovery().disable(); builder.clustering() .stateTransfer().fetchInMemoryState(true) .hash().numOwners(3); createClusteredCaches(4, builder); }
@Override protected void createCacheManagers() throws Throwable { cacheConfigBuilder = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true, true); cacheConfigBuilder.transaction().transactionMode(TransactionMode.TRANSACTIONAL) .transactionManagerLookup(new EmbeddedTransactionManagerLookup()) .lockingMode(LockingMode.PESSIMISTIC) .clustering().hash().numOwners(10) // a number bigger than actual number of nodes will make this distributed cluster behave as if fully replicated .stateTransfer().fetchInMemoryState(true) .awaitInitialTransfer(true); // setting this to false will lead to test failure createCluster(cacheConfigBuilder, 2); waitForClusterToForm(); }
private ConfigurationBuilder buildConfiguration() { ConfigurationBuilder c = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, false); c.clustering().hash().numOwners(NUM_OWNERS); return c; }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder dcc = cacheConfiguration(); dcc.clustering() .cacheMode(cacheMode) .partitionHandling().whenSplit(partitionHandling).mergePolicy(mergePolicy) .hash().numOwners(numberOfOwners); for (int i = 0; i < numMembersInCluster; i++) { EmbeddedCacheManager cm = addClusterEnabledCacheManager(dcc, new TransportFlags().withFD(true).withMerge(true)); Cache cache = cm.getCache(); disableDiscoveryProtocol(channel(cache)); } }
private ConfigurationBuilder configuration() { ConfigurationBuilder configurationBuilder = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true); configurationBuilder.transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .lockingMode(LockingMode.OPTIMISTIC) .locking().lockAcquisitionTimeout(TestingUtil.shortTimeoutMillis()) .isolationLevel(IsolationLevel.REPEATABLE_READ) .clustering().hash().numOwners(2).groups().enabled() .stateTransfer().fetchInMemoryState(false); return configurationBuilder; }
@Override public void accept(ConfigurationBuilder builder) { super.accept(builder); builder.clustering() .hash().capacityFactor(this.capacityFactor).numOwners(this.owners) .l1().enabled(this.l1Lifespan > 0).lifespan(this.l1Lifespan) ; } }
protected ConfigurationBuilder defaultRecoveryConfig() { ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true); builder.transaction().transactionManagerLookup(new EmbeddedTransactionManagerLookup()) .useSynchronization(false) .recovery().enable() .locking().useLockStriping(false) .clustering().hash().numOwners(2) .l1().disable() .stateTransfer().fetchInMemoryState(false); return builder; }
@Override protected ConfigurationBuilder buildConfiguration() { ConfigurationBuilder builder = super.buildConfiguration(); builder.clustering() .cacheMode(CacheMode.DIST_SYNC) .hash().numOwners(1); return builder; } }
@Override protected void createCacheManagers() throws Throwable { dccc = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true, true); dccc.transaction() .transactionManagerLookup(new EmbeddedTransactionManagerLookup()) .lockingMode(LockingMode.PESSIMISTIC) .locking().lockAcquisitionTimeout(TestingUtil.shortTimeoutMillis()) .clustering().hash().numOwners(1).numSegments(3) .l1().disable() .stateTransfer().fetchInMemoryState(true); createCluster(dccc, 2); waitForClusterToForm(); }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, false); builder.clustering().hash().numOwners(2); createClusteredCaches(NUMBER_NODES, builder); }