本文整理汇总了Java中org.apache.ignite.configuration.IgniteConfiguration.setDeploymentMode方法的典型用法代码示例。如果您正苦于以下问题:Java IgniteConfiguration.setDeploymentMode方法的具体用法?Java IgniteConfiguration.setDeploymentMode怎么用?Java IgniteConfiguration.setDeploymentMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ignite.configuration.IgniteConfiguration
的用法示例。
在下文中一共展示了IgniteConfiguration.setDeploymentMode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: helloworldConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
public static IgniteConfiguration helloworldConfiguration() {
int cpus = Runtime.getRuntime().availableProcessors();
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setIgniteInstanceName("hello-world");
cfg.setClientMode(true);
cfg.setPeerClassLoadingEnabled(true);
cfg.setDeploymentMode(DeploymentMode.CONTINUOUS);
cfg.setPeerClassLoadingMissedResourcesCacheSize(200);
cfg.setPublicThreadPoolSize(4 * cpus);
cfg.setSystemThreadPoolSize(2 * cpus);
// log frequency in ms
cfg.setMetricsLogFrequency(30000);
cfg.setGridLogger(igniteLogger());
cfg.setDiscoverySpi(multicastDiscoverySpi());
return cfg;
}
示例2: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
// Override P2P configuration to exclude Task and Job classes
cfg.setPeerClassLoadingLocalClassPathExclude(
GridP2PRemoteTestTask.class.getName(),
GridP2PRemoteTestTask1.class.getName(),
GridP2PRemoteTestJob.class.getName(),
GridP2PRemoteClassLoadersSelfTest.class.getName()
);
cfg.setDeploymentMode(depMode);
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);
// Override P2P configuration to exclude Task and Job classes
cfg.setPeerClassLoadingLocalClassPathExclude(GridDeploymentTestJob.class.getName(),
GridDeploymentTestTask.class.getName());
// Following tests makes sense in ISOLATED modes (they redeploy tasks
// and don't change task version. The different tasks with the same version from the same node
// executed in parallel - this does not work in share mode.)
cfg.setDeploymentMode(DeploymentMode.ISOLATED);
cfg.setPeerClassLoadingLocalClassPathExclude(
"org.apache.ignite.internal.GridMultipleVersionsDeploymentSelfTest*");
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);
CacheConfiguration[] cacheCfgs = new CacheConfiguration[cacheCnt];
for (int i = 0; i < cacheCnt; i++) {
CacheConfiguration cacheCfg = defaultCacheConfiguration();
cacheCfg.setName("partitioned-" + i);
cacheCfg.setCacheMode(PARTITIONED);
cacheCfg.setRebalanceBatchSize(preloadBatchSize);
cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cacheCfg.setRebalanceMode(preloadMode);
cacheCfg.setAffinity(new RendezvousAffinityFunction(false, partitions));
cacheCfg.setBackups(backups);
cacheCfg.setAtomicityMode(TRANSACTIONAL);
cacheCfgs[i] = cacheCfg;
}
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(ipFinder);
cfg.setDiscoverySpi(disco);
cfg.setCacheConfiguration(cacheCfgs);
cfg.setDeploymentMode(CONTINUOUS);
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);
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(ipFinder);
cfg.setDiscoverySpi(disco);
cfg.setCacheConfiguration(cacheConfiguration(igniteInstanceName));
cfg.setDeploymentMode(CONTINUOUS);
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);
// Override P2P configuration to exclude Task and Job classes
cfg.setPeerClassLoadingLocalClassPathExclude(GridP2PTestTask.class.getName(), GridP2PTestJob.class.getName());
cfg.setDeploymentMode(depMode);
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);
if (igniteInstanceName.startsWith("client"))
cfg.setClientMode(true);
cfg.setDeploymentMode(depMode);
return cfg;
}
示例8: 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.setDiscoverySpi(disco);
c.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED);
c.setIncludeProperties();
c.setDeploymentMode(DeploymentMode.SHARED);
c.setNetworkTimeout(10000);
c.setConnectorConfiguration(null);
// c.setPeerClassLoadingLocalClassPathExclude(GridCachePreloadLifecycleAbstractTest.class.getName(),
// MyValue.class.getName());
c.setPublicThreadPoolSize(10);
c.setSystemThreadPoolSize(10);
c.setPeerClassLoadingThreadPoolSize(3);
c.setLifecycleBeans(lifecycleBean);
return c;
}
示例9: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
if (useStrLog) {
strLog = new GridStringLogger(false, cfg.getGridLogger());
cfg.setGridLogger(strLog);
}
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(ipFinder);
cfg.setDiscoverySpi(disco);
cfg.setDeploymentMode(depMode);
if (cacheEnabled) {
CacheConfiguration cacheCfg = defaultCacheConfiguration();
cacheCfg.setName(cacheName);
cacheCfg.setCacheMode(cacheMode);
cacheCfg.setAffinity(aff);
cacheCfg.setBackups(backups);
cacheCfg.setAtomicityMode(TRANSACTIONAL);
if (initCache != null)
initCache.apply(cacheCfg);
cfg.setCacheConfiguration(cacheCfg);
}
else
cfg.setCacheConfiguration();
return cfg;
}
示例10: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@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);
c.setDeploymentMode(CONTINUOUS);
// Cache.
CacheConfiguration cc = defaultCacheConfiguration();
cc.setName(CACHE_NAME);
cc.setCacheMode(PARTITIONED);
cc.setWriteSynchronizationMode(FULL_SYNC);
cc.setRebalanceMode(preloadMode);
cc.setRebalanceBatchSize(preloadBatchSize);
cc.setAffinity(new RendezvousAffinityFunction(false, partitions));
cc.setBackups(backups);
cc.setAtomicityMode(TRANSACTIONAL);
if (!nearEnabled())
cc.setNearConfiguration(null);
c.setCacheConfiguration(cc);
return c;
}
示例11: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setDeploymentMode(DeploymentMode.ISOLATED);
return cfg;
}
示例12: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setDeploymentMode(DeploymentMode.CONTINUOUS);
return cfg;
}
示例13: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setDeploymentMode(depMode);
return cfg;
}
示例14: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
CacheConfiguration cc = defaultCacheConfiguration();
cc.setCacheMode(PARTITIONED);
cc.setRebalanceBatchSize(preloadBatchSize);
cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cc.setRebalanceMode(preloadMode);
cc.setAffinity(new RendezvousAffinityFunction(false, partitions));
cc.setBackups(backups);
cc.setAtomicityMode(TRANSACTIONAL);
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(ipFinder);
if (lbean != null)
c.setLifecycleBeans(lbean);
c.setDiscoverySpi(disco);
c.setCacheConfiguration(cc);
c.setDeploymentMode(CONTINUOUS);
c.setNetworkTimeout(netTimeout);
return c;
}
示例15: 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);
CacheConfiguration cacheCfg = defaultCacheConfiguration();
cacheCfg.setCacheMode(REPLICATED);
cacheCfg.setNearConfiguration(null);
cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
// This property is essential for this test.
cacheCfg.setRebalanceMode(SYNC);
cacheCfg.setRebalanceBatchSize(10000);
cfg.setCacheConfiguration(cacheCfg);
cfg.setDeploymentMode(CONTINUOUS);
return cfg;
}