当前位置: 首页>>代码示例>>Java>>正文


Java IgniteConfiguration.setFailureDetectionTimeout方法代码示例

本文整理汇总了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;
}
 
开发者ID:apache,项目名称:ignite,代码行数:32,代码来源:GridCacheNearMultiNodeSelfTest.java

示例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;
}
 
开发者ID:apache,项目名称:ignite,代码行数:23,代码来源:TcpCommunicationSpiFaultyClientTest.java

示例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;
}
 
开发者ID:apache,项目名称:ignite,代码行数:20,代码来源:TcpCommunicationSpiDropNodesTest.java

示例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;
}
 
开发者ID:apache,项目名称:ignite,代码行数:27,代码来源:IgniteCacheAbstractTest.java

示例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;
}
 
开发者ID:apache,项目名称:ignite,代码行数:26,代码来源:GridCacheAbstractSelfTest.java

示例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;
}
 
开发者ID:apache,项目名称:ignite,代码行数:21,代码来源:GridCacheQueueClientDisconnectTest.java

示例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;
}
 
开发者ID:apache,项目名称:ignite,代码行数:16,代码来源:GridCacheMvccManagerSelfTest.java

示例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;
}
 
开发者ID:apache,项目名称:ignite,代码行数:18,代码来源:IndexingSpiQuerySelfTest.java

示例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;
}
 
开发者ID:apache,项目名称:ignite,代码行数:34,代码来源:GridCachePartitionedTxSingleThreadedSelfTest.java

示例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;
}
 
开发者ID:apache,项目名称:ignite,代码行数:32,代码来源:GridCacheNearMultiGetSelfTest.java

示例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;
}
 
开发者ID:apache,项目名称:ignite,代码行数:35,代码来源:GridCacheColocatedTxSingleThreadedSelfTest.java

示例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;
}
 
开发者ID:apache,项目名称:ignite,代码行数:16,代码来源:GridCacheNodeFailureAbstractTest.java


注:本文中的org.apache.ignite.configuration.IgniteConfiguration.setFailureDetectionTimeout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。