use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class IgniteTxAbstractTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(ipFinder);
c.setDiscoverySpi(disco);
return c;
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class AtomicPutAllChangingTopologyTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
return cfg;
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class GridCacheNearClientHitTest method getClientConfiguration.
/**
* @param igniteInstanceName Node name.
* @return Configuration.
* @throws Exception If failed.
*/
private IgniteConfiguration getClientConfiguration(final String igniteInstanceName) throws Exception {
final IgniteConfiguration cfg = getConfiguration(igniteInstanceName);
cfg.setClientMode(true);
return cfg;
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class GridCacheNearMultiGetSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@SuppressWarnings({ "ConstantConditions" })
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
c.getTransactionConfiguration().setTxSerializableEnabled(true);
CacheConfiguration cc = defaultCacheConfiguration();
cc.setCacheMode(PARTITIONED);
cc.setBackups(1);
cc.setAtomicityMode(TRANSACTIONAL);
cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cc.setRebalanceMode(NONE);
TcpDiscoverySpi spi = new TcpDiscoverySpi();
spi.setIpFinder(ipFinder);
c.setFailureDetectionTimeout(Integer.MAX_VALUE);
c.setDiscoverySpi(spi);
c.setCacheConfiguration(cc);
if (CACHE_DEBUG)
resetLog4j(Level.DEBUG, false, GridCacheProcessor.class.getPackage().getName());
return c;
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class GridCachePartitionedTxSalvageSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
// Discovery.
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(ipFinder);
c.setDiscoverySpi(disco);
CacheConfiguration cc = defaultCacheConfiguration();
cc.setCacheMode(PARTITIONED);
cc.setAffinity(new RendezvousAffinityFunction(false, 18));
cc.setBackups(1);
cc.setRebalanceMode(SYNC);
c.setCacheConfiguration(cc);
return c;
}
Aggregations