Java Code Examples for org.apache.ignite.configuration.IgniteConfiguration#setClientFailureDetectionTimeout()
The following examples show how to use
org.apache.ignite.configuration.IgniteConfiguration#setClientFailureDetectionTimeout() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ZookeeperDiscoveryClientDisconnectTest.java From ignite with Apache License 2.0 | 5 votes |
/** */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); // we reduce fealure detection tp speedup failure detection on catch(Exception) clause in createTcpClient(). cfg.setFailureDetectionTimeout(2000); cfg.setClientFailureDetectionTimeout(2000); return cfg; }
Example 2
Source File: TcpCommunicationSpiFreezingClientTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); cfg.setFailureDetectionTimeout(120000); cfg.setClientFailureDetectionTimeout(120000); TcpCommunicationSpi spi = new TcpCommunicationSpi(); spi.setConnectTimeout(3000); spi.setMaxConnectTimeout(6000); spi.setReconnectCount(3); spi.setIdleConnectionTimeout(100); spi.setSharedMemoryPort(-1); TcpDiscoverySpi discoSpi = (TcpDiscoverySpi)cfg.getDiscoverySpi(); discoSpi.setIpFinder(IP_FINDER); cfg.setCommunicationSpi(spi); cfg.setDiscoverySpi(discoSpi); cfg.setCacheConfiguration(new CacheConfiguration(DEFAULT_CACHE_NAME).setWriteSynchronizationMode(FULL_SYNC). setCacheMode(PARTITIONED).setAtomicityMode(ATOMIC)); return cfg; }
Example 3
Source File: GridDiscoveryManagerAliveCacheSelfTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); CacheConfiguration cCfg = defaultCacheConfiguration(); cCfg.setCacheMode(PARTITIONED); cCfg.setBackups(1); cCfg.setNearConfiguration(new NearCacheConfiguration()); cCfg.setRebalanceMode(SYNC); cCfg.setWriteSynchronizationMode(FULL_SYNC); TcpDiscoverySpi disc = (TcpDiscoverySpi)cfg.getDiscoverySpi(); if (clientMode && ((igniteInstanceName.charAt(igniteInstanceName.length() - 1) - '0') & 1) != 0) cfg.setClientMode(true); else cfg.setClientFailureDetectionTimeout(50000); disc.setAckTimeout(1000); disc.setSocketTimeout(1000); cfg.setCacheConfiguration(cCfg); cfg.setMetricsUpdateFrequency(500); return cfg; }
Example 4
Source File: GridServiceClientNodeTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setClientFailureDetectionTimeout(30000); cfg.setMetricsUpdateFrequency(1000); return cfg; }
Example 5
Source File: ServiceDeploymentOnClientDisconnectTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setClientFailureDetectionTimeout(CLIENT_FAILURE_DETECTION_TIMEOUT); if (cfg.getDiscoverySpi() instanceof TcpDiscoverySpi) ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setClientReconnectDisabled(false); return cfg; }
Example 6
Source File: GridCacheQueueClientDisconnectTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setClientReconnectDisabled(false); cfg.setFailureDetectionTimeout(FAILURE_DETECTION_TIMEOUT); cfg.setClientFailureDetectionTimeout(FAILURE_DETECTION_TIMEOUT); return cfg; }
Example 7
Source File: IgniteCacheAtomicProtocolTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); cfg.setConsistentId(gridName); cfg.setClientFailureDetectionTimeout(Integer.MAX_VALUE); TestRecordingCommunicationSpi commSpi = new TestRecordingCommunicationSpi(); cfg.setCommunicationSpi(commSpi); if (ccfg != null) cfg.setCacheConfiguration(ccfg); return cfg; }
Example 8
Source File: IgniteCacheNearRestartRollbackSelfTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setClientFailureDetectionTimeout(50000); cfg.setCacheConfiguration(cacheConfiguration(igniteInstanceName)); ((TcpDiscoverySpi)cfg.getDiscoverySpi()) .setForceServerMode(getTestIgniteInstanceName(3).equals(igniteInstanceName)); TcpCommunicationSpi commSpi = new TcpCommunicationSpi(); commSpi.setSharedMemoryPort(-1); cfg.setCommunicationSpi(commSpi); return cfg; }
Example 9
Source File: TcpDiscoveryClientSuspensionSelfTest.java From ignite with Apache License 2.0 | 3 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); cfg.setMetricsUpdateFrequency(100); cfg.setClientFailureDetectionTimeout(1000); return cfg; }