Class RpcChannel.RpcCollector

java.lang.Object
org.apache.catalina.tribes.group.RpcChannel.RpcCollector
Enclosing class:
RpcChannel

public static class RpcChannel.RpcCollector extends Object
Class that holds all response.
  • Field Details

    • responses

      public final ArrayList<Response> responses
      Collected responses.
    • key

      public final RpcChannel.RpcCollectorKey key
      The collector key.
    • options

      public final int options
      The RPC options.
    • destcnt

      public int destcnt
      The destination count.
  • Constructor Details

    • RpcCollector

      public RpcCollector(RpcChannel.RpcCollectorKey key, int options, int destcnt)
      Create a new RpcCollector.
      Parameters:
      key - The collector key
      options - The RPC options
      destcnt - The destination count
  • Method Details

    • addResponse

      public void addResponse(Serializable message, Member sender)
      Add a response to the collector.
      Parameters:
      message - The response message
      sender - The sender of the response
    • isComplete

      public boolean isComplete()
      Check if the collector has received enough responses.
      Returns:
      true if the collector is complete
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getResponses

      public Response[] getResponses()
      Get the collected responses.
      Returns:
      the collected responses