use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class IgniteVariousConnectionNumberTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
int connections = rnd.nextInt(10) + 1;
log.info("Node connections [name=" + igniteInstanceName + ", connections=" + connections + ']');
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setConnectionsPerNode(connections);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setUsePairedConnections(rnd.nextBoolean());
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
cfg.setClientMode(client);
return cfg;
}
use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class CacheTxNotAllowReadFromBackupTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
return cfg;
}
use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class IgniteCacheAbstractTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
TcpDiscoverySpi disco = new TcpDiscoverySpi().setForceServerMode(true);
disco.setIpFinder(ipFinder);
if (isDebug())
disco.setAckTimeout(Integer.MAX_VALUE);
MemoryEventStorageSpi evtSpi = new MemoryEventStorageSpi();
evtSpi.setExpireCount(100);
cfg.setFailureDetectionTimeout(Integer.MAX_VALUE);
cfg.setEventStorageSpi(evtSpi);
cfg.setDiscoverySpi(disco);
cfg.setCacheConfiguration(cacheConfiguration(igniteInstanceName));
return cfg;
}
use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class GridCacheAbstractFailoverSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setNetworkTimeout(60_000);
cfg.setMetricsUpdateFrequency(5_000);
TcpDiscoverySpi discoSpi = (TcpDiscoverySpi) cfg.getDiscoverySpi();
discoSpi.setSocketTimeout(30_000);
discoSpi.setAckTimeout(30_000);
discoSpi.setNetworkTimeout(60_000);
discoSpi.setReconnectCount(2);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
return cfg;
}
use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class IgniteCacheCreateRestartSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
cfg.setPeerClassLoadingEnabled(false);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
return cfg;
}
Aggregations