use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.
the class GridCacheMarshallerTxAbstractTest 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);
return cfg;
}
use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.
the class GridCacheMultiUpdateLockSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
discoSpi.setIpFinder(IP_FINDER);
cfg.setDiscoverySpi(discoSpi);
cfg.setCacheConfiguration(cacheConfiguration());
cfg.setCheckpointSpi(new NoopCheckpointSpi());
return cfg;
}
use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.
the class CacheConnectionLeakStoreTxTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(IP_FINDER);
cfg.setDiscoverySpi(disco);
cfg.setClientMode(client);
return cfg;
}
use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.
the class CacheExchangeMessageDuplicatedStateTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
cfg.setClientMode(client);
TestRecordingCommunicationSpi commSpi = new TestRecordingCommunicationSpi();
commSpi.record(new IgniteBiPredicate<ClusterNode, Message>() {
@Override
public boolean apply(ClusterNode node, Message msg) {
return (msg.getClass() == GridDhtPartitionsSingleMessage.class || msg.getClass() == GridDhtPartitionsFullMessage.class) && ((GridDhtPartitionsAbstractMessage) msg).exchangeId() != null;
}
});
cfg.setCommunicationSpi(commSpi);
List<CacheConfiguration> ccfgs = new ArrayList<>();
{
CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName(AFF1_CACHE1);
ccfg.setAffinity(new RendezvousAffinityFunction(false, 512));
ccfgs.add(ccfg);
}
{
CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName(AFF1_CACHE2);
ccfg.setAffinity(new RendezvousAffinityFunction(false, 512));
ccfgs.add(ccfg);
}
{
CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName(AFF3_CACHE1);
ccfg.setBackups(3);
RendezvousAffinityFunction aff = new RendezvousAffinityFunction(false, 64);
ccfg.setAffinity(aff);
ccfgs.add(ccfg);
}
{
CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName(AFF4_FILTER_CACHE1);
ccfg.setNodeFilter(new TestNodeFilter());
ccfg.setAffinity(new RendezvousAffinityFunction());
ccfgs.add(ccfg);
}
{
CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName(AFF4_FILTER_CACHE2);
ccfg.setNodeFilter(new TestNodeFilter());
ccfg.setAffinity(new RendezvousAffinityFunction());
ccfgs.add(ccfg);
}
cfg.setCacheConfiguration(ccfgs.toArray(new CacheConfiguration[ccfgs.size()]));
return cfg;
}
use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.
the class CacheGroupsMetricsRebalanceTest method getConfiguration.
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
CacheConfiguration cfg1 = new CacheConfiguration().setName(CACHE1).setGroupName(GROUP).setCacheMode(CacheMode.PARTITIONED).setAtomicityMode(CacheAtomicityMode.ATOMIC).setRebalanceMode(CacheRebalanceMode.ASYNC).setRebalanceBatchSize(100).setStatisticsEnabled(true);
CacheConfiguration cfg2 = new CacheConfiguration(cfg1).setName(CACHE2);
CacheConfiguration cfg3 = new CacheConfiguration().setName(CACHE3).setCacheMode(CacheMode.PARTITIONED).setAtomicityMode(CacheAtomicityMode.ATOMIC).setRebalanceMode(CacheRebalanceMode.ASYNC).setRebalanceBatchSize(100).setStatisticsEnabled(true).setRebalanceDelay(REBALANCE_DELAY);
cfg.setCacheConfiguration(cfg1, cfg2, cfg3);
return cfg;
}
Aggregations