ClusterManagementService (Apache Geode 1.10.0)
Date: 2019-09-19

org.apache.geode.management.api

## Interface ClusterManagementService

- All Superinterfaces:
    AutoCloseable

      @Experimental
      public interface ClusterManagementService
      extends AutoCloseable

  this is responsible for applying and persisting cache configuration changes on locators and/or servers.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` release any resources controlled by this service
    `<T extends CacheElement> ClusterManagementRealizationResult` | `create(T config)` This method will create the element on all the applicable members in the cluster and persist the configuration in the cluster configuration if persistence is enabled.
    `<T extends CacheElement> ClusterManagementRealizationResult` | `delete(T config)` This method will delete the element on all the applicable members in the cluster and update the configuration in the cluster configuration if persistence is enabled.
    `<T extends CacheElement & CorrespondWith<R>,R extends RuntimeInfo> ClusterManagementListResult<T,R>` | `get(T config)` This method will list a single instance of the element type in the cluster configuration, along with additional runtime information from cluster members
    `boolean` | `isConnected()` Test to see if this instance of ClusterManagementService retrieved from the client side is properly connected to the locator or not
    `<A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementListOperationsResult<V>` | `list(A opType)` This method will list the status of all asynchronous cluster management operations in progress or recently completed.
    `<T extends CacheElement & CorrespondWith<R>,R extends RuntimeInfo> ClusterManagementListResult<T,R>` | `list(T config)` This method will list instances of the element type in the cluster configuration, along with additional runtime information from cluster members
    `<A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementOperationResult<V>` | `start(A op)` This method will launch a cluster management operation asynchronously.
    `<T extends CacheElement> ClusterManagementRealizationResult` | `update(T config)` This method will update the element on all the applicable members in the cluster and persist the updated configuration in the cluster configuration if persistence is enabled.

- - ### Method Detail

    - #### create

          <T extends CacheElement> ClusterManagementRealizationResult create(T config)

      This method will create the element on all the applicable members in the cluster and persist the configuration in the cluster configuration if persistence is enabled.
      Parameters:
        `config` - this holds the configuration attributes of the element to be created on the cluster, as well as the group this config belongs to
      Returns:
        a `ClusterManagementRealizationResult` indicating the success of the creation
      Throws:
        `ClusterManagementRealizationException` - if unsuccessful
      See Also:
        `CacheElement`

    - #### delete

          <T extends CacheElement> ClusterManagementRealizationResult delete(T config)

      This method will delete the element on all the applicable members in the cluster and update the configuration in the cluster configuration if persistence is enabled.
      Parameters:
        `config` - this holds the configuration attributes of the element to be deleted on the cluster
      Returns:
        a `ClusterManagementRealizationResult` indicating the success of the deletion
      Throws:
        `ClusterManagementRealizationException` - if unsuccessful
      See Also:
        `CacheElement`

    - #### update

          <T extends CacheElement> ClusterManagementRealizationResult update(T config)

      This method will update the element on all the applicable members in the cluster and persist the updated configuration in the cluster configuration if persistence is enabled.
      Parameters:
        `config` - this holds the configuration attributes of the element to be updated on the cluster
      Returns:
        a `ClusterManagementRealizationResult` indicating the success of the update
      Throws:
        `ClusterManagementRealizationException` - if unsuccessful
      See Also:
        `CacheElement`

    - #### list

          <T extends CacheElement & CorrespondWith<R>,R extends RuntimeInfo> ClusterManagementListResult<T,R> list(T config)

      This method will list instances of the element type in the cluster configuration, along with additional runtime information from cluster members
      Parameters:
        `config` - this may be used to filter the search results by id or group (check documentation for individual element types to see if they support filtering by addition attributes)
      Returns:
        a `ClusterManagementListResult` holding a list of matching instances in `ClusterManagementListResult.getResult()`
      Throws:
        `ClusterManagementException` - if unsuccessful
      See Also:
        `CacheElement`

    - #### get

          <T extends CacheElement & CorrespondWith<R>,R extends RuntimeInfo> ClusterManagementListResult<T,R> get(T config)

      This method will list a single instance of the element type in the cluster configuration, along with additional runtime information from cluster members
      Parameters:
        `config` - this must be used to filter the search results to a single result, generally by supplying the name (id) of the desired config element
      Returns:
        a `ClusterManagementListResult` holding a single element in `ClusterManagementListResult.getResult()`
      Throws:
        `ClusterManagementException` - if unsuccesful or, no matching element is found, or multiple matches are found
      See Also:
        `CacheElement`

    - #### start

          <A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementOperationResult<V> start(A op)

      This method will launch a cluster management operation asynchronously.
      Type Parameters:
        `A` - the operation type (a subclass of `ClusterManagementOperation`
        `V` - the return type of the operation
      Parameters:
        `op` - the operation plus any parameters.
      Returns:
        a `ClusterManagementOperationResult` holding a `CompletableFuture` (if the operation was launched successfully) or an error code otherwise.
      Throws:
        `ClusterManagementException` - if unsuccessful

    - #### list

          <A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementListOperationsResult<V> list(A opType)

      This method will list the status of all asynchronous cluster management operations in progress or recently completed.
      Type Parameters:
        `A` - the operation type (a subclass of `ClusterManagementOperation`
        `V` - the return type of the operation
      Parameters:
        `opType` - the operation type to list
      Returns:
        a list of `ClusterManagementOperationResult`
      Throws:
        `ClusterManagementException` - if unsuccessful

    - #### isConnected

          boolean isConnected()

      Test to see if this instance of ClusterManagementService retrieved from the client side is properly connected to the locator or not
      Returns:
        true if connected

    - #### close

          void close()

      release any resources controlled by this service
      Specified by:
        `close` in interface `AutoCloseable`