Interface StateExecutor


  • @Internal
    public interface StateExecutor
    Executor for executing batch StateRequests.

    Notice that the owner who create the StateExecutor is responsible for shutting down it when it is no longer in use.

    • Method Detail

      • executeBatchRequests

        CompletableFuture<Void> executeBatchRequests​(StateRequestContainer stateRequestContainer)
        Execute a batch of state requests.
        Parameters:
        stateRequestContainer - The StateRequestContainer which holds the given batch of processing requests.
        Returns:
        A future can determine whether execution has completed.
      • executeRequestSync

        void executeRequestSync​(StateRequest<?,​?,​?,​?> stateRequest)
        Execute a single state request *synchronously*. This is for synchronous APIs.
        Parameters:
        stateRequest - the request to run.
      • fullyLoaded

        boolean fullyLoaded()
        Check if this executor is fully loaded. Will be invoked to determine whether to give more requests to run or wait for a while.
        Returns:
        the count.
      • shutdown

        void shutdown()
        Shutdown the StateExecutor, and new committed state execution requests will be rejected.