use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class IgniteBinaryMetadataUpdateNodeRestartTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
cfg.setMarshaller(null);
CacheConfiguration ccfg1 = cacheConfiguration(TX_CACHE, TRANSACTIONAL);
CacheConfiguration ccfg2 = cacheConfiguration(ATOMIC_CACHE, ATOMIC);
cfg.setCacheConfiguration(ccfg1, ccfg2);
cfg.setClientMode(client);
return cfg;
}
use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class IgniteCache150ClientsTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setLocalHost("127.0.0.1");
cfg.setNetworkTimeout(30_000);
cfg.setConnectorConfiguration(null);
cfg.setPeerClassLoadingEnabled(false);
cfg.setTimeServerPortRange(200);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSocketWriteTimeout(200);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setLocalPortRange(200);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setJoinTimeout(0);
cfg.setClientFailureDetectionTimeout(200000);
cfg.setClientMode(!igniteInstanceName.equals(getTestIgniteInstanceName(0)));
cfg.setClientConnectorConfiguration(new ClientConnectorConfiguration().setPortRange(1000));
CacheConfiguration[] ccfgs = new CacheConfiguration[CACHES];
for (int i = 0; i < ccfgs.length; i++) {
CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setAtomicityMode(i % 2 == 0 ? ATOMIC : TRANSACTIONAL);
ccfg.setWriteSynchronizationMode(PRIMARY_SYNC);
ccfg.setBackups(1);
ccfg.setName("cache-" + i);
ccfgs[i] = ccfg;
}
cfg.setCacheConfiguration(ccfgs);
return cfg;
}
use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class IgniteCacheConnectionRecovery10ConnectionsTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setConnectionsPerNode(10);
return cfg;
}
use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class IgniteCacheCreatePutTest method getConfiguration.
/**
* {@inheritDoc}
*/
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
cfg.setPeerClassLoadingEnabled(false);
TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
discoSpi.setIpFinder(ipFinder);
cfg.setDiscoverySpi(discoSpi);
cfg.setMarshaller(new BinaryMarshaller());
CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName("cache*");
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
ccfg.setWriteSynchronizationMode(FULL_SYNC);
cfg.setCacheConfiguration(ccfg);
cfg.setClientMode(client);
return cfg;
}
use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class IgniteCacheManyClientsTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setFailureDetectionTimeout(20_000);
cfg.setConnectorConfiguration(null);
cfg.setPeerClassLoadingEnabled(false);
cfg.setTimeServerPortRange(200);
MemoryEventStorageSpi eventSpi = new MemoryEventStorageSpi();
eventSpi.setExpireCount(100);
cfg.setEventStorageSpi(eventSpi);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setLocalPortRange(200);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinderCleanFrequency(10 * 60_000);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setJoinTimeout(2 * 60_000);
if (!clientDiscovery)
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setForceServerMode(true);
cfg.setClientMode(client);
CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(PARTITIONED);
ccfg.setAtomicityMode(ATOMIC);
ccfg.setWriteSynchronizationMode(PRIMARY_SYNC);
ccfg.setBackups(1);
cfg.setCacheConfiguration(ccfg);
return cfg;
}
Aggregations