Package org.jgroups.util
Class AckCollector
- java.lang.Object
-
- org.jgroups.util.AckCollector
-
public class AckCollector extends java.lang.Object
Collects acks from a number of nodes, waits for all acks. Can also be time bounded- Author:
- Bela Ban
-
-
Field Summary
Fields Modifier and Type Field Description protected Promise<java.lang.Boolean>
all_acks_received
protected java.util.List<Address>
missing_acks
List of members from whom we haven't received an ACK yet
-
Constructor Summary
Constructors Constructor Description AckCollector()
AckCollector(java.util.Collection<Address> members)
AckCollector(Address... members)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
ack(java.util.Collection<Address> members)
void
ack(Address member)
void
ack(Address... members)
protected void
addAll(java.util.Collection<Address> members)
protected void
addAll(java.util.Collection<Address> members, java.util.Collection<Address> exclude)
protected void
addAll(java.util.Collection<Address> members, Address... exclude)
protected void
addAll(Address... members)
void
destroy()
int
expectedAcks()
java.lang.String
printMissing()
void
reset(java.util.Collection<Address> members)
AckCollector
reset(java.util.Collection<Address> expected_acks, java.util.Collection<Address> exclude)
AckCollector
reset(java.util.Collection<Address> expected_acks, Address... exclude)
boolean
retainAll(java.util.Collection<Address> members)
int
size()
void
suspect(java.util.Collection<Address> members)
void
suspect(Address member)
void
suspect(Address... members)
java.lang.String
toString()
boolean
waitForAllAcks()
boolean
waitForAllAcks(long timeout)
-
-
-
Method Detail
-
reset
public void reset(java.util.Collection<Address> members)
-
reset
public AckCollector reset(java.util.Collection<Address> expected_acks, java.util.Collection<Address> exclude)
-
reset
public AckCollector reset(java.util.Collection<Address> expected_acks, Address... exclude)
-
destroy
public void destroy()
-
size
public int size()
-
expectedAcks
public int expectedAcks()
-
ack
public void ack(Address member)
-
ack
public void ack(Address... members)
-
ack
public void ack(java.util.Collection<Address> members)
-
suspect
public void suspect(Address member)
-
suspect
public void suspect(Address... members)
-
suspect
public void suspect(java.util.Collection<Address> members)
-
retainAll
public boolean retainAll(java.util.Collection<Address> members)
-
waitForAllAcks
public boolean waitForAllAcks()
-
waitForAllAcks
public boolean waitForAllAcks(long timeout) throws java.util.concurrent.TimeoutException
- Throws:
java.util.concurrent.TimeoutException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
printMissing
public java.lang.String printMissing()
-
addAll
protected void addAll(Address... members)
-
addAll
protected void addAll(java.util.Collection<Address> members)
-
addAll
protected void addAll(java.util.Collection<Address> members, java.util.Collection<Address> exclude)
-
-