Search in sources :

Example 1 with DistributedSystemConfigImpl

use of org.apache.geode.admin.internal.DistributedSystemConfigImpl in project geode by apache.

the class AdminDistributedSystemFactory method defineDistributedSystem.

/**
   * Defines a distributed system configuration for administering the distributed system to which
   * this VM is currently connected. The <code>DistributedSystem</code> is used to configure the
   * discovery mechanism (multicast or locators), bind address, SSL attributes, as well as the
   * logger of the <code>DistributedSystemConfig</code>. Note that the distributed system will not
   * be able to be administered until the {@link AdminDistributedSystem#connect connect} method is
   * invoked.
   *
   * @param system A connection to the distributed system
   * @param remoteCommand The shell command that is used to launch processes that run on remote
   *        machines. If <code>null</code>, then the
   *        {@linkplain DistributedSystemConfig#DEFAULT_REMOTE_COMMAND default} will be used.
   *
   * @since GemFire 4.0
   */
public static DistributedSystemConfig defineDistributedSystem(DistributedSystem system, String remoteCommand) throws AdminException {
    InternalDistributedSystem internal = (InternalDistributedSystem) system;
    if (remoteCommand == null) {
        remoteCommand = DistributedSystemConfig.DEFAULT_REMOTE_COMMAND;
    }
    DistributedSystemConfigImpl impl = new DistributedSystemConfigImpl(internal.getConfig(), remoteCommand);
    return impl;
}
Also used : InternalDistributedSystem(org.apache.geode.distributed.internal.InternalDistributedSystem) DistributedSystemConfigImpl(org.apache.geode.admin.internal.DistributedSystemConfigImpl)

Example 2 with DistributedSystemConfigImpl

use of org.apache.geode.admin.internal.DistributedSystemConfigImpl in project geode by apache.

the class AdminDistributedSystemFactory method defineDistributedSystem.

/**
   * Defines a "default" distributed system configuration based on VM system properties and the
   * content of <code>gemfire.properties</code>. The
   * {@linkplain DistributedSystemConfig#DEFAULT_REMOTE_COMMAND} default remote command is used.
   *
   * @see DistributedSystem#connect
   */
public static DistributedSystemConfig defineDistributedSystem() {
    DistributionConfig dc = new DistributionConfigImpl(new Properties());
    String remoteCommand = DistributedSystemConfig.DEFAULT_REMOTE_COMMAND;
    return new DistributedSystemConfigImpl(dc, remoteCommand);
}
Also used : DistributionConfig(org.apache.geode.distributed.internal.DistributionConfig) DistributionConfigImpl(org.apache.geode.distributed.internal.DistributionConfigImpl) Properties(java.util.Properties) DistributedSystemConfigImpl(org.apache.geode.admin.internal.DistributedSystemConfigImpl)

Aggregations

DistributedSystemConfigImpl (org.apache.geode.admin.internal.DistributedSystemConfigImpl)2 Properties (java.util.Properties)1 DistributionConfig (org.apache.geode.distributed.internal.DistributionConfig)1 DistributionConfigImpl (org.apache.geode.distributed.internal.DistributionConfigImpl)1 InternalDistributedSystem (org.apache.geode.distributed.internal.InternalDistributedSystem)1