Class RpcChannel.RpcCollector

  • Enclosing class:
    RpcChannel

    public static class RpcChannel.RpcCollector
    extends java.lang.Object
    Class that holds all response.
    • Field Detail

      • responses

        public final java.util.ArrayList<Response> responses
        Collected responses.
      • options

        public final int options
        The RPC options.
      • destcnt

        public int destcnt
        The destination count.
    • Constructor Detail

      • 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 Detail

      • addResponse

        public void addResponse​(java.io.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 java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • getResponses

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