Class Request<T>

All Implemented Interfaces:
CompletionStage<T>, Future<T>
Direct Known Subclasses:
GroupRequest, UnicastRequest

public abstract class Request<T> extends CompletableFuture<T>
Abstract class for a unicast or multicast request
  • Field Details

    • req_id

      protected long req_id
    • corr

      protected final RequestCorrelator corr
    • options

      protected final RequestOptions options
    • start_time

      protected long start_time
  • Constructor Details

  • Method Details

    • requestId

      public Request<T> requestId(long req_id)
    • requestId

      public long requestId()
    • setResponseFilter

      public Request<T> setResponseFilter(RspFilter filter)
    • execute

      public T execute(Message msg, boolean block_for_results) throws Exception
      Throws:
      Exception
    • sendRequest

      public abstract void sendRequest(Message req) throws Exception
      Throws:
      Exception
    • receiveResponse

      public abstract void receiveResponse(Object response_value, Address sender, boolean is_exception)
    • viewChange

      public abstract void viewChange(View new_view, boolean handle_previous_subgroups)
    • siteUnreachable

      public abstract void siteUnreachable(String site)
    • memberUnreachable

      public abstract void memberUnreachable(Address mbr)
    • transportClosed

      public abstract void transportClosed()
    • waitForCompletion

      public abstract T waitForCompletion(long timeout, TimeUnit unit) throws Exception
      Blocks until all responses have been received and returns result or throws exception
      Throws:
      Exception
    • waitForCompletion

      public abstract T waitForCompletion() throws Exception
      Throws:
      Exception
    • cancel

      public boolean cancel(boolean mayInterruptIfRunning)
      Specified by:
      cancel in interface Future<T>
      Overrides:
      cancel in class CompletableFuture<T>
    • toString

      public String toString()
      Overrides:
      toString in class CompletableFuture<T>
    • corrDone

      protected void corrDone()