Package org.apache.geode.management.api
Interface ClusterManagementService
- All Superinterfaces:
AutoCloseable
Implementations of this interface are responsible for applying and persisting cache
configuration changes.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()release any resources controlled by this service<T extends AbstractConfiguration<?>>
ClusterManagementRealizationResultcreate(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 AbstractConfiguration<?>>
ClusterManagementRealizationResultdelete(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.<A extends ClusterManagementOperation<V>,V extends OperationResult>
ClusterManagementOperationResult<A,V> Returns the status of the identified operation.<T extends AbstractConfiguration<R>,R extends RuntimeInfo>
ClusterManagementGetResult<T,R> get(T config) This method will get a single instance of the element type in the cluster configuration, along with additional runtime information from cluster members<A extends ClusterManagementOperation<V>,V extends OperationResult>
CompletableFuture<ClusterManagementOperationResult<A,V>> Returns aCompletableFuturethat provides a synchronous way to get the result of a completed operation.booleanTest 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<A,V> list(A opType) This method will list the status of all asynchronous cluster management operations in progress or recently completed.<T extends AbstractConfiguration<R>,R extends RuntimeInfo>
ClusterManagementListResult<T,R> list(T filter) 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<A,V> start(A op) This method will launch a cluster management operation asynchronously.<T extends AbstractConfiguration<?>>
ClusterManagementRealizationResultupdate(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 Details
-
create
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.- Type Parameters:
T- the type ofAbstractConfigurationto create- 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
ClusterManagementRealizationResultindicating the success of the creation - Throws:
ClusterManagementRealizationException- if unsuccessful
-
delete
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.- Type Parameters:
T- the type ofAbstractConfigurationto delete- Parameters:
config- this holds the name or id of the element to be deleted on the cluster- Returns:
- a
ClusterManagementRealizationResultindicating the success of the deletion - Throws:
ClusterManagementRealizationException- if unsuccessful
-
update
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.- Type Parameters:
T- the type ofAbstractConfigurationto update- Parameters:
config- this holds the configuration attributes of the element to be updated on the cluster, as well as the group this config belongs to- Returns:
- a
ClusterManagementRealizationResultindicating the success of the update - Throws:
ClusterManagementRealizationException- if unsuccessful
-
list
<T extends AbstractConfiguration<R>,R extends RuntimeInfo> ClusterManagementListResult<T,R> list(T filter) This method will list instances of the element type in the cluster configuration, along with additional runtime information from cluster members- Type Parameters:
T- the type ofAbstractConfigurationto listR- the type ofRuntimeInfoused by theAbstractConfiguration- Parameters:
filter- the filterable attributes are used to identify the elements to list. Any non-filterable attributes will be ignored.- Returns:
- a
ClusterManagementListResultholding a list of matching instances inClusterManagementListResult.getResult() - Throws:
ClusterManagementException- if unsuccessful
-
get
<T extends AbstractConfiguration<R>,R extends RuntimeInfo> ClusterManagementGetResult<T,R> get(T config) This method will get a single instance of the element type in the cluster configuration, along with additional runtime information from cluster members- Type Parameters:
T- the type ofAbstractConfigurationto getR- the type ofRuntimeInfoused by theAbstractConfiguration- Parameters:
config- this holds the name or id of the element to be retrieved- Returns:
- a
ClusterManagementGetResult - Throws:
ClusterManagementException- if unsuccessful or, no matching element is found, or multiple matches are found
-
start
<A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementOperationResult<A,V> start(A op) This method will launch a cluster management operation asynchronously.- Type Parameters:
A- the operation type (a subclass ofClusterManagementOperationV- the return type of the operation- Parameters:
op- the operation plus any parameters.- Returns:
- a
ClusterManagementOperationResultholding aCompletableFuture(if the operation was launched successfully) or an error code otherwise. - Throws:
ClusterManagementException- if unsuccessful
-
get
<A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementOperationResult<A,V> get(A opType, String opId) Returns the status of the identified operation.- Type Parameters:
A- the operation type (a subclass ofClusterManagementOperationV- the return type of the operation- Parameters:
opType- the type of the operation to getopId- the operationId of a previously started operation- Returns:
- the status of the identified operation
-
getFuture
<A extends ClusterManagementOperation<V>,V extends OperationResult> CompletableFuture<ClusterManagementOperationResult<A,V>> getFuture(A opType, String opId) Returns aCompletableFuturethat provides a synchronous way to get the result of a completed operation.- Type Parameters:
A- the operation type (a subclass ofClusterManagementOperationV- the return type of the operation- Parameters:
opType- the type of the operation to getopId- the operationId of a previously started operation- Returns:
- the status of the identified operation
-
list
<A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementListOperationsResult<A,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 ofClusterManagementOperationV- 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:
closein interfaceAutoCloseable
-