Package org.apache.catalina.tribes.group
Class RpcChannel.RpcCollector
- java.lang.Object
-
- org.apache.catalina.tribes.group.RpcChannel.RpcCollector
-
- Enclosing class:
- RpcChannel
public static class RpcChannel.RpcCollector extends java.lang.ObjectClass that holds all response.
-
-
Constructor Summary
Constructors Constructor Description RpcCollector(RpcChannel.RpcCollectorKey key, int options, int destcnt)Create a new RpcCollector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddResponse(java.io.Serializable message, Member sender)Add a response to the collector.booleanequals(java.lang.Object o)Response[]getResponses()Get the collected responses.inthashCode()booleanisComplete()Check if the collector has received enough responses.
-
-
-
Field Detail
-
responses
public final java.util.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 Detail
-
RpcCollector
public RpcCollector(RpcChannel.RpcCollectorKey key, int options, int destcnt)
Create a new RpcCollector.- Parameters:
key- The collector keyoptions- The RPC optionsdestcnt- 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 messagesender- The sender of the response
-
isComplete
public boolean isComplete()
Check if the collector has received enough responses.- Returns:
trueif the collector is complete
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
getResponses
public Response[] getResponses()
Get the collected responses.- Returns:
- the collected responses
-
-