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


Java IgniteConfiguration.setDeploymentSpi方法代码示例

本文整理汇总了Java中org.apache.ignite.configuration.IgniteConfiguration.setDeploymentSpi方法的典型用法代码示例。如果您正苦于以下问题:Java IgniteConfiguration.setDeploymentSpi方法的具体用法?Java IgniteConfiguration.setDeploymentSpi怎么用?Java IgniteConfiguration.setDeploymentSpi使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.ignite.configuration.IgniteConfiguration的用法示例。


在下文中一共展示了IgniteConfiguration.setDeploymentSpi方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration() throws Exception {
    IgniteConfiguration cfg = super.getConfiguration();
    cfg.setDeploymentSpi(new LocalDeploymentSpi());

    cfg.setMetricsUpdateFrequency(500);

    cfg.setDeploymentMode(depMode);

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:12,代码来源:ExternalNonSpringAopSelfTest.java

示例2: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setEventStorageSpi(new GridTestRuntimeExceptionSpi());
    cfg.setDeploymentSpi(new GridTestCheckedExceptionSpi());

    // Disable cache since it can deploy some classes during start process.
    cfg.setCacheConfiguration();

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:13,代码来源:GridSpiExceptionSelfTest.java

示例3: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setDeploymentSpi(depSpi = new TestDeploymentSpi());
    cfg.setPeerClassLoadingEnabled(p2pEnabled);

    // Disable cache since it can deploy some classes during start process.
    cfg.setCacheConfiguration();

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:13,代码来源:GridDeploymentSelfTest.java

示例4: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration c = super.getConfiguration(igniteInstanceName);

    UriDeploymentSpi deploymentSpi = new UriDeploymentSpi();

    deploymentSpi.setUriList(
        Arrays.asList(U.resolveIgniteUrl("modules/extdata/uri/target/resources/").toURI().toString()));

    if (igniteInstanceName.endsWith("2")) {
        // Delay deployment for 2nd grid only.
        Field f = deploymentSpi.getClass().getDeclaredField("delayOnNewOrUpdatedFile");

        f.setAccessible(true);

        f.set(deploymentSpi, true);
    }

    c.setDeploymentSpi(deploymentSpi);

    return c;
}
 
开发者ID:apache,项目名称:ignite,代码行数:23,代码来源:GridTaskUriDeploymentDeadlockSelfTest.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.setPeerClassLoadingEnabled(false);

    cfg.setDeploymentMode(depMode);

    if (initGar) {
        UriDeploymentSpi depSpi = new UriDeploymentSpi();

        depSpi.setUriList(Collections.singletonList(garFile));

        cfg.setDeploymentSpi(depSpi);
    }

    cfg.setMetricsUpdateFrequency(500);

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:21,代码来源:GridP2PDisabledSelfTest.java

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

示例7: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setDeploymentSpi(new LocalDeploymentSpi());

    ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);

    cfg.setMetricsUpdateFrequency(500);
    cfg.setDeploymentMode(depMode);

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:14,代码来源:AbstractAopTest.java

示例8: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName,
    IgniteTestResources rsrcs) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName, rsrcs);

    LocalDeploymentSpi spi = new LocalDeploymentSpi();

    spis.put(igniteInstanceName, spi);

    cfg.setDeploymentSpi(spi);

    cfg.setDeploymentMode(depMode);

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:16,代码来源:GridP2PUndeploySelfTest.java


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