@Override public LockingConfiguration get() { return new ConfigurationBuilder().locking() .lockAcquisitionTimeout(this.timeout) .concurrencyLevel(this.concurrency) .isolationLevel(this.isolation) .useLockStriping(this.striping) .create(); }
@Override protected void enhanceConfiguration(ConfigurationBuilder builder) { builder.locking().isolationLevel(IsolationLevel.READ_COMMITTED); } }
@Override protected ConfigurationBuilder buildConfiguration() { ConfigurationBuilder builder = super.buildConfiguration(); builder.locking().isolationLevel(isolationLevel); return builder; }
protected void configure(ConfigurationBuilder builder) { super.configure(builder); builder.locking().isolationLevel(IsolationLevel.REPEATABLE_READ); } }
@Override protected ConfigurationBuilder getTargetCacheConfiguration(int sourcePort) { ConfigurationBuilder targetCacheConfiguration = super.getTargetCacheConfiguration(sourcePort); targetCacheConfiguration.locking().isolationLevel(IsolationLevel.READ_COMMITTED); return targetCacheConfiguration; } }
protected void createCacheManagers() throws Throwable { ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, true); builder.locking().isolationLevel(IsolationLevel.SERIALIZABLE) // TODO: Another case of default values changed (see ISPN-2651) .transaction().useSynchronization(false); List<Cache<Object, Object>> caches = createClusteredCaches(2, "cache", builder); cache1 = caches.get(0); cache2 = caches.get(1); }
public void testNoneIsolationLevel() { ConfigurationBuilder builder = new ConfigurationBuilder(); builder.locking().isolationLevel(IsolationLevel.NONE); withCacheManager(new CacheManagerCallable( createCacheManager(builder)) { @Override public void call() { Configuration cfg = cm.getCache().getCacheConfiguration(); assertEquals(IsolationLevel.NONE, cfg.locking().isolationLevel()); } }); }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder dcc = getDefaultClusteredCacheConfig(mode, true); dcc.locking().isolationLevel(IsolationLevel.REPEATABLE_READ); createCluster(dcc, clusterSize); waitForClusterToForm(); }
@Override protected void decorate(ConfigurationBuilder builder) { builder.transaction().transactionProtocol(TransactionProtocol.TOTAL_ORDER) .recovery().disable(); builder.locking().isolationLevel(IsolationLevel.REPEATABLE_READ); } }
@BeforeMethod public void setUp() throws Exception { ConfigurationBuilder builder = TestCacheManagerFactory.getDefaultCacheConfiguration(true); builder.transaction().autoCommit(false) .clustering().cacheMode(CacheMode.LOCAL) .locking().isolationLevel(IsolationLevel.REPEATABLE_READ); cm = TestCacheManagerFactory.createCacheManager(builder); cache = cm.getCache(); tm = TestingUtil.getTransactionManager(cache); mockNotifier = mock(CacheNotifier.class); origNotifier = TestingUtil.replaceComponent(cache, CacheNotifier.class, mockNotifier, true); }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true); builder.locking().isolationLevel(IsolationLevel.REPEATABLE_READ); builder.clustering().hash().numOwners(1); createClusteredCaches(2, builder); }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder dcc = getDefaultClusteredCacheConfig(mode, true); dcc.transaction().lockingMode(lockingMode); if (writeSkewCheck) { dcc.transaction().locking().isolationLevel(IsolationLevel.REPEATABLE_READ); } createCluster(dcc, NODES_NUM); waitForClusterToForm(); }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder dcc = getDefaultClusteredCacheConfig(cacheMode, transactional); if (compatibility) { dcc.compatibility().enable(); } if (transactional) { dcc.transaction().locking().isolationLevel(IsolationLevel.READ_COMMITTED); } createCluster(dcc, numNodes); waitForClusterToForm(); }
private ConfigurationBuilder defaultConfigurationBuilder() { ConfigurationBuilder builder = TestCacheManagerFactory.getDefaultCacheConfiguration(true); builder.clustering().cacheMode(getCacheMode()) .locking().isolationLevel(IsolationLevel.REPEATABLE_READ) .transaction().lockingMode(LockingMode.OPTIMISTIC); return builder; }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder builder = getDefaultClusteredCacheConfig(cacheMode, true); builder.locking().isolationLevel(IsolationLevel.REPEATABLE_READ); builder.transaction().lockingMode(lockingMode); builder.clustering().hash().numOwners(1); createClusteredCaches(2, builder); }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true); builder.locking() .isolationLevel(IsolationLevel.READ_COMMITTED); //read committed is enough builder.transaction() .lockingMode(LockingMode.PESSIMISTIC); builder.clustering().hash() .numOwners(2); createClusteredCaches(3, builder); }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder dcc = getDefaultClusteredCacheConfig(CacheMode.LOCAL, false); dcc.memory().storageType(StorageType.OFF_HEAP).size(COUNT).evictionType(EvictionType.COUNT); dcc.locking().isolationLevel(IsolationLevel.READ_COMMITTED); // Only start up the 1 cache addClusterEnabledCacheManager(dcc); configureTimeService(); }
protected ConfigurationBuilder getConfigurationBuilder() { ConfigurationBuilder c = new ConfigurationBuilder(); c.clustering().cacheMode(cacheMode); c.transaction().transactionMode(transactionMode()); if (lockingMode != null) { c.transaction().lockingMode(lockingMode); } c.locking().isolationLevel(IsolationLevel.READ_COMMITTED); return c; }
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 { ConfigurationBuilder c = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true); c.transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .lockingMode(LockingMode.PESSIMISTIC) .locking().isolationLevel(IsolationLevel.REPEATABLE_READ) .locking().lockAcquisitionTimeout(TestingUtil.shortTimeoutMillis()); c.clustering().hash().numOwners(1).groups().enabled(); createClusteredCaches(2, "atomic", c); } }