本文整理汇总了Java中org.apache.ignite.configuration.IgniteConfiguration.setFailureDetectionTimeout方法的典型用法代码示例。如果您正苦于以下问题:Java IgniteConfiguration.setFailureDetectionTimeout方法的具体用法?Java IgniteConfiguration.setFailureDetectionTimeout怎么用?Java IgniteConfiguration.setFailureDetectionTimeout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ignite.configuration.IgniteConfiguration
的用法示例。
在下文中一共展示了IgniteConfiguration.setFailureDetectionTimeout方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi spi = new TcpDiscoverySpi();
spi.setIpFinder(ipFinder);
cfg.setFailureDetectionTimeout(Integer.MAX_VALUE);
cfg.setDiscoverySpi(spi);
CacheConfiguration cacheCfg = defaultCacheConfiguration();
cacheCfg.setCacheMode(PARTITIONED);
cacheCfg.setCacheStoreFactory(singletonFactory(store));
cacheCfg.setReadThrough(true);
cacheCfg.setWriteThrough(true);
cacheCfg.setLoadPreviousValue(true);
cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cacheCfg.setAffinity(aff);
cacheCfg.setAtomicityMode(atomicityMode());
cacheCfg.setBackups(BACKUPS);
cacheCfg.setNearConfiguration(new NearCacheConfiguration());
cfg.setCacheConfiguration(cacheCfg);
cfg.setUserAttributes(F.asMap(GridCacheModuloAffinityFunction.IDX_ATTR, cntr.getAndIncrement()));
return cfg;
}
示例2: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setFailureDetectionTimeout(1000);
cfg.setClientMode(clientMode);
TestCommunicationSpi spi = new TestCommunicationSpi();
spi.setIdleConnectionTimeout(100);
spi.setSharedMemoryPort(-1);
TcpDiscoverySpi discoSpi = (TcpDiscoverySpi) cfg.getDiscoverySpi();
discoSpi.setIpFinder(IP_FINDER);
discoSpi.setClientReconnectDisabled(true);
cfg.setCommunicationSpi(spi);
cfg.setDiscoverySpi(discoSpi);
return cfg;
}
示例3: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setFailureDetectionTimeout(1000);
TestCommunicationSpi spi = new TestCommunicationSpi();
spi.setIdleConnectionTimeout(100);
spi.setSharedMemoryPort(-1);
TcpDiscoverySpi discoSpi = (TcpDiscoverySpi) cfg.getDiscoverySpi();
discoSpi.setIpFinder(IP_FINDER);
cfg.setCommunicationSpi(spi);
cfg.setDiscoverySpi(discoSpi);
return cfg;
}
示例4: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@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;
}
示例5: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setFailureDetectionTimeout(Integer.MAX_VALUE);
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(ipFinder);
if (isDebug())
disco.setAckTimeout(Integer.MAX_VALUE);
cfg.setDiscoverySpi(disco);
cfg.setCacheConfiguration(cacheConfiguration(igniteInstanceName));
TcpCommunicationSpi comm = new TcpCommunicationSpi();
comm.setSharedMemoryPort(-1);
cfg.setCommunicationSpi(comm);
return cfg;
}
示例6: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi spi = new TcpDiscoverySpi();
spi.setIpFinder(ipFinder);
spi.setClientReconnectDisabled(false);
cfg.setDiscoverySpi(spi);
cfg.setFailureDetectionTimeout(FAILURE_DETECTION_TIMEOUT);
cfg.setClientFailureDetectionTimeout(FAILURE_DETECTION_TIMEOUT);
if (clientMode)
cfg.setClientMode(true);
return cfg;
}
示例7: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(ipFinder);
cfg.setDiscoverySpi(disco);
cfg.setFailureDetectionTimeout(Integer.MAX_VALUE);
cfg.setCacheConfiguration(cacheConfiguration());
return cfg;
}
示例8: configuration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/**
* @return Configuration.
*/
protected IgniteConfiguration configuration() {
IgniteConfiguration cfg = new IgniteConfiguration();
TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(ipFinder);
cfg.setDiscoverySpi(disco);
cfg.setFailureDetectionTimeout(Integer.MAX_VALUE);
return cfg;
}
示例9: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@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.setEvictionPolicy(null);
cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_ASYNC);
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;
}
示例10: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@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;
}
示例11: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@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.setNearConfiguration(null);
cc.setAtomicityMode(TRANSACTIONAL);
cc.setEvictionPolicy(null);
cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_ASYNC);
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;
}
示例12: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(ipFinder);
c.setFailureDetectionTimeout(Integer.MAX_VALUE);
c.setDiscoverySpi(disco);
c.setDeploymentMode(DeploymentMode.SHARED);
return c;
}