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


Java IgniteConfiguration.getDeploymentMode方法代码示例

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


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

示例1: validate

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/**
 * Validates service configuration.
 *
 * @param c Service configuration.
 * @throws IgniteException If validation failed.
 */
private void validate(ServiceConfiguration c) throws IgniteException {
    IgniteConfiguration cfg = ctx.config();

    DeploymentMode depMode = cfg.getDeploymentMode();

    if (cfg.isPeerClassLoadingEnabled() && (depMode == PRIVATE || depMode == ISOLATED))
        throw new IgniteException("Cannot deploy services in PRIVATE or ISOLATED deployment mode: " + depMode);

    ensure(c.getName() != null, "getName() != null", null);
    ensure(c.getTotalCount() >= 0, "getTotalCount() >= 0", c.getTotalCount());
    ensure(c.getMaxPerNodeCount() >= 0, "getMaxPerNodeCount() >= 0", c.getMaxPerNodeCount());
    ensure(c.getService() != null, "getService() != null", c.getService());
    ensure(c.getTotalCount() > 0 || c.getMaxPerNodeCount() > 0,
        "c.getTotalCount() > 0 || c.getMaxPerNodeCount() > 0", null);
}
 
开发者ID:apache,项目名称:ignite,代码行数:22,代码来源:GridServiceProcessor.java

示例2: start

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public void start() throws IgniteCheckedException {
    ctx.addNodeAttribute(ATTR_SERVICES_COMPATIBILITY_MODE, srvcCompatibilitySysProp);

    if (ctx.isDaemon())
        return;

    IgniteConfiguration cfg = ctx.config();

    DeploymentMode depMode = cfg.getDeploymentMode();

    if (cfg.isPeerClassLoadingEnabled() && (depMode == PRIVATE || depMode == ISOLATED) &&
        !F.isEmpty(cfg.getServiceConfiguration()))
        throw new IgniteCheckedException("Cannot deploy services in PRIVATE or ISOLATED deployment mode: " + depMode);
}
 
开发者ID:apache,项目名称:ignite,代码行数:16,代码来源:GridServiceProcessor.java

示例3: VisorBasicConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/**
 * Create data transfer object for node basic configuration properties.
 *
 * @param ignite Grid.
 * @param c Grid configuration.
 */
public VisorBasicConfiguration(IgniteEx ignite, IgniteConfiguration c) {
    igniteInstanceName = c.getIgniteInstanceName();
    ggHome = getProperty(IGNITE_HOME, c.getIgniteHome());
    locHost = getProperty(IGNITE_LOCAL_HOST, c.getLocalHost());
    marsh = compactClass(c.getMarshaller());
    deployMode = c.getDeploymentMode();
    clientMode = c.isClientMode();
    daemon = boolValue(IGNITE_DAEMON, c.isDaemon());
    jmxRemote = ignite.isJmxRemoteEnabled();
    restart = ignite.isRestartEnabled();
    netTimeout = c.getNetworkTimeout();
    log = compactClass(c.getGridLogger());
    discoStartupDelay = c.getDiscoveryStartupDelay();
    mBeanSrv = compactClass(c.getMBeanServer());
    noAscii = boolValue(IGNITE_NO_ASCII, false);
    noDiscoOrder = boolValue(IGNITE_NO_DISCO_ORDER, false);
    noShutdownHook = boolValue(IGNITE_NO_SHUTDOWN_HOOK, false);
    progName = getProperty(IGNITE_PROG_NAME);
    quiet = boolValue(IGNITE_QUIET, true);
    successFile = getProperty(IGNITE_SUCCESS_FILE);
    updateNtf = boolValue(IGNITE_UPDATE_NOTIFIER, true);
    activeOnStart = c.isActiveOnStart();
    addrRslvr = compactClass(c.getAddressResolver());
    cacheSanityCheckEnabled = c.isCacheSanityCheckEnabled();
    clsLdr = compactClass(c.getClassLoader());
    consistentId = c.getConsistentId() != null ? String.valueOf(c.getConsistentId()) : null;
    failureDetectionTimeout = c.getFailureDetectionTimeout();
    igniteWorkDir = c.getWorkDirectory();
    lateAffAssignment = c.isLateAffinityAssignment();
    marshLocJobs = c.isMarshalLocalJobs();
    metricsUpdateFreq = c.getMetricsUpdateFrequency();
    clientFailureDetectionTimeout = c.getClientFailureDetectionTimeout();
    sndRetryCnt = c.getNetworkSendRetryCount();
    sndRetryDelay = c.getNetworkSendRetryDelay();
    timeSrvPortBase = c.getTimeServerPortBase();
    timeSrvPortRange = c.getTimeServerPortRange();
    utilityCacheKeepAliveTime = c.getUtilityCacheKeepAliveTime();
}
 
开发者ID:apache,项目名称:ignite,代码行数:45,代码来源:VisorBasicConfiguration.java


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