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) |
Map<Address,T> |
getResults() |
boolean |
hasAllResponses() |
void |
remove(Address member) |
void |
reset() |
void |
reset(Address... members) |
void |
reset(Collection<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 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.