use of org.apache.ignite.internal.processors.cache.GridCacheAlwaysEvictionPolicy in project ignite by apache.
the class CacheGetInsideLockChangingTopologyTest method beforeTestsStarted.
/** {@inheritDoc} */
@Override
protected void beforeTestsStarted() throws Exception {
super.beforeTestsStarted();
startGridsMultiThreaded(SRVS);
client.set(true);
Ignite client1 = startGrid(SRVS);
assertTrue(client1.configuration().isClientMode());
client.set(true);
Ignite client2 = startGrid(SRVS + 1);
assertTrue(client2.configuration().isClientMode());
client2.createNearCache(TX_CACHE1, new NearCacheConfiguration<>().setNearEvictionPolicy(new GridCacheAlwaysEvictionPolicy<>()));
client2.createNearCache(TX_CACHE2, new NearCacheConfiguration<>().setNearEvictionPolicy(new GridCacheAlwaysEvictionPolicy<>()));
client2.createNearCache(ATOMIC_CACHE, new NearCacheConfiguration<>().setNearEvictionPolicy(new GridCacheAlwaysEvictionPolicy<>()));
}
use of org.apache.ignite.internal.processors.cache.GridCacheAlwaysEvictionPolicy in project ignite by apache.
the class GridCachePartitionedMultiThreadedPutGetSelfTest method getConfiguration.
/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
c.getTransactionConfiguration().setTxSerializableEnabled(true);
CacheConfiguration cc = defaultCacheConfiguration();
cc.setCacheMode(PARTITIONED);
cc.setBackups(1);
cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
FifoEvictionPolicy plc = new FifoEvictionPolicy();
plc.setMaxMemorySize(1000);
cc.setEvictionPolicy(plc);
cc.setOnheapCacheEnabled(true);
cc.setAtomicityMode(TRANSACTIONAL);
NearCacheConfiguration nearCfg = new NearCacheConfiguration();
nearCfg.setNearEvictionPolicy(new GridCacheAlwaysEvictionPolicy());
cc.setNearConfiguration(nearCfg);
c.setCacheConfiguration(cc);
TcpDiscoverySpi spi = new TcpDiscoverySpi();
spi.setIpFinder(ipFinder);
c.setDiscoverySpi(spi);
return c;
}
Aggregations