ClusterManagementOperationResult (Apache Geode 1.11.0)
Date: 2019-12-20

org.apache.geode.management.api

## Class ClusterManagementOperationResult<V extends OperationResult>

- java.lang.Object
- - org.apache.geode.management.api.ClusterManagementResult
  - - org.apache.geode.management.api.ClusterManagementOperationResult<V>

- Type Parameters:
    `V` - the type of the operation's result

      @Experimental
      public class ClusterManagementOperationResult<V extends OperationResult>
      extends ClusterManagementResult

  This is normally returned by `ClusterManagementService.start(ClusterManagementOperation)` to convey status of launching the async operation, and if successful, the `CompletableFuture` to access the status, result, and start/end times of the async operation.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.geode.management.api.ClusterManagementResult

      `ClusterManagementResult.StatusCode`

  - ### Field Summary

    - ### Fields inherited from class org.apache.geode.management.api.ClusterManagementResult

      `statusCode`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClusterManagementOperationResult()` for internal use only
    `ClusterManagementOperationResult(ClusterManagementResult result, CompletableFuture<V> operationResult, Date operationStart, CompletableFuture<Date> futureOperationEnded, String operator, String operationId)` normally called by `ClusterManagementService.start(ClusterManagementOperation)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CompletableFuture<Date>` | `getFutureOperationEnded()` Returns the future time the async operation completed.
    `CompletableFuture<V>` | `getFutureResult()` Returns the future result of the async operation
    `Date` | `getOperationEnded()` Returns the actual time the async operation completed, or null if not yet completed
    `String` | `getOperationId()` returns the operation id started by this operation.
    `Date` | `getOperationStart()` Returns the time at which the async operation was requested
    `String` | `getOperator()` Returns the user who initiated the async operation, if initiated externally and security is enabled
    `V` | `getResult()` Returns the completed result of the async operation (blocks until complete, if necessary)

    - ### Methods inherited from class org.apache.geode.management.api.ClusterManagementResult

      `getStatusCode, getStatusMessage, isSuccessful, setLinks, setStatus, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ClusterManagementOperationResult

          public ClusterManagementOperationResult()

      for internal use only

    - #### ClusterManagementOperationResult

          public ClusterManagementOperationResult(ClusterManagementResult result,
                                                  CompletableFuture<V> operationResult,
                                                  Date operationStart,
                                                  CompletableFuture<Date> futureOperationEnded,
                                                  String operator,
                                                  String operationId)

      normally called by `ClusterManagementService.start(ClusterManagementOperation)`

  - ### Method Detail

    - #### getFutureResult

          public CompletableFuture<V> getFutureResult()

      Returns the future result of the async operation

    - #### getResult

          public V getResult()
                      throws ExecutionException,
                             InterruptedException

      Returns the completed result of the async operation (blocks until complete, if necessary)
      Throws:
        `ExecutionException`
        `InterruptedException`

    - #### getOperationStart

          public Date getOperationStart()

      Returns the time at which the async operation was requested

    - #### getFutureOperationEnded

          public CompletableFuture<Date> getFutureOperationEnded()

      Returns the future time the async operation completed. This is guaranteed to complete before `getFutureResult()`. Note: subsequent stages must be chained to `getFutureResult()`, not here.

    - #### getOperationEnded

          public Date getOperationEnded()

      Returns the actual time the async operation completed, or null if not yet completed

    - #### getOperator

          public String getOperator()

      Returns the user who initiated the async operation, if initiated externally and security is enabled

    - #### getOperationId

          public String getOperationId()

      returns the operation id started by this operation.