use of org.apache.ignite.configuration.AtomicConfiguration in project ignite by apache.
the class GridCachePartitionedAtomicSequenceTxSelfTest method atomicConfiguration.
/**
* @return Atomic config for test.
*/
protected AtomicConfiguration atomicConfiguration() {
AtomicConfiguration cfg = new AtomicConfiguration();
cfg.setBackups(1);
cfg.setAtomicSequenceReserveSize(SEQ_CACHE_SIZE);
return cfg;
}
use of org.apache.ignite.configuration.AtomicConfiguration in project ignite by apache.
the class GridCachePartitionedAtomicSequenceTxSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi spi = new TcpDiscoverySpi();
spi.setIpFinder(ipFinder);
cfg.setDiscoverySpi(spi);
cfg.setPublicThreadPoolSize(THREAD_NUM);
AtomicConfiguration atomicCfg = atomicConfiguration();
assertNotNull(atomicCfg);
cfg.setAtomicConfiguration(atomicCfg);
return cfg;
}
use of org.apache.ignite.configuration.AtomicConfiguration in project ignite by apache.
the class GridCacheAbstractDataStructuresFailoverSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
AtomicConfiguration atomicCfg = new AtomicConfiguration();
atomicCfg.setCacheMode(collectionCacheMode());
atomicCfg.setBackups(collectionConfiguration().getBackups());
cfg.setAtomicConfiguration(atomicCfg);
CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName(TRANSACTIONAL_CACHE_NAME);
ccfg.setAtomicityMode(TRANSACTIONAL);
cfg.setCacheConfiguration(ccfg);
if (client) {
cfg.setClientMode(client);
((TcpDiscoverySpi) (cfg.getDiscoverySpi())).setForceServerMode(true);
}
return cfg;
}
use of org.apache.ignite.configuration.AtomicConfiguration in project ignite by apache.
the class SemaphoreFailoverSafeReleasePermitsTest method atomicConfiguration.
/**
* @return Atomic configuration.
*/
protected AtomicConfiguration atomicConfiguration() {
AtomicConfiguration atomicCfg = new AtomicConfiguration();
atomicCfg.setCacheMode(atomicsCacheMode);
if (atomicsCacheMode == PARTITIONED)
atomicCfg.setBackups(1);
return atomicCfg;
}
use of org.apache.ignite.configuration.AtomicConfiguration in project ignite by apache.
the class SemaphoreFailoverSafeReleasePermitsTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi spi = new TcpDiscoverySpi();
spi.setIpFinder(ipFinder);
cfg.setDiscoverySpi(spi);
AtomicConfiguration atomicCfg = atomicConfiguration();
assertNotNull(atomicCfg);
cfg.setAtomicConfiguration(atomicCfg);
return cfg;
}
Aggregations