本文整理汇总了Java中org.apache.ignite.configuration.IgniteConfiguration.setCollisionSpi方法的典型用法代码示例。如果您正苦于以下问题:Java IgniteConfiguration.setCollisionSpi方法的具体用法?Java IgniteConfiguration.setCollisionSpi怎么用?Java IgniteConfiguration.setCollisionSpi使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ignite.configuration.IgniteConfiguration
的用法示例。
在下文中一共展示了IgniteConfiguration.setCollisionSpi方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration() throws Exception {
IgniteConfiguration cfg = super.getConfiguration();
cfg.setCollisionSpi(new GridSessionCollisionSpi());
return cfg;
}
示例2: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/**
* @return Configuration.
* @throws Exception If failed.
*/
@Override protected IgniteConfiguration getConfiguration() throws Exception {
IgniteConfiguration cfg = super.getConfiguration();
cfg.setCollisionSpi(new GridTestCollision());
return cfg;
}
示例3: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setCollisionSpi(new TestCollisionSpi());
return cfg;
}
示例4: initializeDefaultSpi
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/**
* Initialize default SPI implementations.
*
* @param cfg Ignite configuration.
*/
private void initializeDefaultSpi(IgniteConfiguration cfg) {
if (cfg.getDiscoverySpi() == null)
cfg.setDiscoverySpi(new TcpDiscoverySpi());
if (cfg.getDiscoverySpi() instanceof TcpDiscoverySpi) {
TcpDiscoverySpi tcpDisco = (TcpDiscoverySpi)cfg.getDiscoverySpi();
if (tcpDisco.getIpFinder() == null)
tcpDisco.setIpFinder(new TcpDiscoveryMulticastIpFinder());
}
if (cfg.getCommunicationSpi() == null)
cfg.setCommunicationSpi(new TcpCommunicationSpi());
if (cfg.getDeploymentSpi() == null)
cfg.setDeploymentSpi(new LocalDeploymentSpi());
if (cfg.getEventStorageSpi() == null)
cfg.setEventStorageSpi(new NoopEventStorageSpi());
if (cfg.getCheckpointSpi() == null)
cfg.setCheckpointSpi(new NoopCheckpointSpi());
if (cfg.getCollisionSpi() == null)
cfg.setCollisionSpi(new NoopCollisionSpi());
if (cfg.getFailoverSpi() == null)
cfg.setFailoverSpi(new AlwaysFailoverSpi());
if (cfg.getLoadBalancingSpi() == null)
cfg.setLoadBalancingSpi(new RoundRobinLoadBalancingSpi());
else {
Collection<LoadBalancingSpi> spis = new ArrayList<>();
boolean dfltLoadBalancingSpi = false;
for (LoadBalancingSpi spi : cfg.getLoadBalancingSpi()) {
spis.add(spi);
if (!dfltLoadBalancingSpi && spi instanceof RoundRobinLoadBalancingSpi)
dfltLoadBalancingSpi = true;
}
// Add default load balancing SPI for internal tasks.
if (!dfltLoadBalancingSpi)
spis.add(new RoundRobinLoadBalancingSpi());
cfg.setLoadBalancingSpi(spis.toArray(new LoadBalancingSpi[spis.size()]));
}
if (cfg.getIndexingSpi() == null)
cfg.setIndexingSpi(new NoopIndexingSpi());
}
示例5: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
CollisionSpi colSpi = new AlwaysCancelCollisionSpi();
cfg.setCollisionSpi(colSpi);
return cfg;
}
开发者ID:apache,项目名称:ignite,代码行数:11,代码来源:IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest.java
示例6: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
FifoQueueCollisionSpi collision = new FifoQueueCollisionSpi();
collision.setParallelJobsNumber(1);
cfg.setCollisionSpi(collision);
return cfg;
}