public class ResponseCollector<T> extends Object
Constructor and Description |
---|
ResponseCollector() |
ResponseCollector(Address... members) |
ResponseCollector(Collection<Address> members) |
Modifier and Type | Method and Description |
---|---|
void |
add(Address member,
T data) |
List<Address> |
getMissing()
Returns a list of members which didn't send a valid response
|
Map<Address,T> |
getResults() |
List<Address> |
getValidResults() |
boolean |
hasAllResponses() |
int |
numberOfValidResponses() |
void |
remove(Address member) |
void |
remove(List<Address> members) |
void |
reset() |
void |
reset(Address... members) |
void |
reset(Collection<Address> members) |
void |
retainAll(List<Address> members) |
int |
size() |
void |
suspect(Address member) |
String |
toString() |
boolean |
waitForAllResponses(long timeout)
Waits until all responses have been received, or until a timeout has elapsed.
|
public ResponseCollector(Collection<Address> members)
members
- List of members from which we expect responsespublic ResponseCollector(Address... members)
public ResponseCollector()
public void remove(Address member)
public void suspect(Address member)
public boolean hasAllResponses()
public int numberOfValidResponses()
public List<Address> getMissing()
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(Collection<Address> members)
public void reset(Address... members)
Copyright © 2013 JBoss, a division of Red Hat. All rights reserved.