public class ResponseCollector<T>
extends java.lang.Object
构造器和说明 |
---|
ResponseCollector() |
ResponseCollector(Address... members) |
ResponseCollector(java.util.Collection<Address> members) |
限定符和类型 | 方法和说明 |
---|---|
void |
add(Address member,
T data) |
java.util.List<Address> |
getMissing()
Returns a list of members which didn't send a valid response
|
java.util.Map<Address,T> |
getResults() |
java.util.List<Address> |
getValidResults() |
boolean |
hasAllResponses() |
int |
numberOfValidResponses() |
void |
remove(Address member) |
void |
remove(java.util.List<Address> members) |
void |
reset() |
void |
reset(Address... members) |
void |
reset(java.util.Collection<Address> members) |
void |
retainAll(java.util.List<Address> members) |
int |
size() |
void |
suspect(Address member) |
java.lang.String |
toString() |
boolean |
waitForAllResponses(long timeout)
Waits until all responses have been received, or until a timeout has elapsed.
|
public ResponseCollector(java.util.Collection<Address> members)
members
- List of members from which we expect responsespublic ResponseCollector(Address... members)
public ResponseCollector()
public void remove(Address member)
public void remove(java.util.List<Address> members)
public void retainAll(java.util.List<Address> members)
public void suspect(Address member)
public boolean hasAllResponses()
public int numberOfValidResponses()
public java.util.List<Address> getMissing()
public java.util.List<Address> getValidResults()
public int size()
public boolean waitForAllResponses(long timeout)
timeout
- Number of milliseconds to wait max. This value needs to be greater than 0, or else
it will be adjusted to 2000public void reset()
public void reset(java.util.Collection<Address> members)
public void reset(Address... members)
public java.lang.String toString()
toString
在类中 java.lang.Object