use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.
the class CacheInterceptorPartitionCounterLocalSanityTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(new TcpDiscoveryVmIpFinder(true));
return cfg;
}
use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.
the class CacheStopAndDestroySelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration iCfg = super.getConfiguration(igniteInstanceName);
if (getTestIgniteInstanceName(2).equals(igniteInstanceName)) {
iCfg.setClientMode(true);
iCfg.setDataStorageConfiguration(memCfg);
}
((TcpDiscoverySpi) iCfg.getDiscoverySpi()).setIpFinder(ipFinder);
((TcpDiscoverySpi) iCfg.getDiscoverySpi()).setForceServerMode(true);
iCfg.setCacheConfiguration();
TcpCommunicationSpi commSpi = new CountingTxRequestsToClientNodeTcpCommunicationSpi();
commSpi.setLocalPort(GridTestUtils.getNextCommPort(getClass()));
commSpi.setTcpNoDelay(true);
iCfg.setCommunicationSpi(commSpi);
return iCfg;
}
use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.
the class CacheTxFastFinishTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setAtomicityMode(TRANSACTIONAL);
ccfg.setBackups(1);
ccfg.setWriteSynchronizationMode(FULL_SYNC);
if (nearCache)
ccfg.setNearConfiguration(new NearCacheConfiguration());
cfg.setCacheConfiguration(ccfg);
cfg.setClientMode(client);
return cfg;
}
use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.
the class GridAbstractCacheInterceptorRebalanceTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(final String igniteInstanceName) throws Exception {
final IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
final CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>(CACHE_NAME);
assertNotNull(interceptor);
ccfg.setInterceptor(interceptor);
ccfg.setAtomicityMode(atomicityMode());
ccfg.setWriteSynchronizationMode(FULL_SYNC);
ccfg.setRebalanceMode(SYNC);
ccfg.setBackups(2);
cfg.setCacheConfiguration(ccfg);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
return cfg;
}
use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.
the class GridCacheClearLocallySelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
CacheConfiguration ccfgLoc = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfgLoc.setName(CACHE_LOCAL);
ccfgLoc.setCacheMode(LOCAL);
ccfgLoc.setWriteSynchronizationMode(FULL_SYNC);
ccfgLoc.setAtomicityMode(TRANSACTIONAL);
CacheConfiguration ccfgPartitioned = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfgPartitioned.setName(CACHE_PARTITIONED);
ccfgPartitioned.setCacheMode(PARTITIONED);
ccfgPartitioned.setBackups(1);
ccfgPartitioned.setWriteSynchronizationMode(FULL_SYNC);
NearCacheConfiguration nearCfg = new NearCacheConfiguration();
ccfgPartitioned.setNearConfiguration(nearCfg);
ccfgPartitioned.setNodeFilter(new AttributeFilter(getTestIgniteInstanceName(0)));
ccfgPartitioned.setAtomicityMode(TRANSACTIONAL);
CacheConfiguration ccfgColocated = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfgColocated.setName(CACHE_COLOCATED);
ccfgColocated.setCacheMode(PARTITIONED);
ccfgColocated.setBackups(1);
ccfgColocated.setWriteSynchronizationMode(FULL_SYNC);
ccfgColocated.setAtomicityMode(TRANSACTIONAL);
CacheConfiguration ccfgReplicated = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfgReplicated.setName(CACHE_REPLICATED);
ccfgReplicated.setCacheMode(REPLICATED);
ccfgReplicated.setWriteSynchronizationMode(FULL_SYNC);
ccfgReplicated.setAtomicityMode(TRANSACTIONAL);
cfg.setCacheConfiguration(ccfgLoc, ccfgPartitioned, ccfgColocated, ccfgReplicated);
TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
discoSpi.setIpFinder(IP_FINDER);
cfg.setDiscoverySpi(discoSpi);
return cfg;
}
Aggregations