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


Java IgniteConfiguration.setDeploymentMode方法代码示例

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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