org.opends.server.replication.server
Class AckMessageList

java.lang.Object
  extended by org.opends.server.replication.server.AckMessageList
Direct Known Subclasses:
ReplServerAckMessageList

public class AckMessageList
extends java.lang.Object

This class is used to store the list of acks received for a Given Update Messages. The acks are kept only for the update that are marked, hopefully this should be a limited number of updates and in all cases, LDAP servers operations are going to be blocked waiting for these acks so they won't be able to generate a huge number of such messages. Therefore, the amount of memory used keeping those changes is not a problem,


Constructor Summary
AckMessageList(ChangeNumber changeNumber, int numExpectedAcks)
          Creates a new AckMessageList for a given ChangeNumber.
 
Method Summary
 void addAck(short serverId)
          Add an ack from a given LDAP server to the ack list.
 boolean completed()
          This method can be used to check if all acks have been received for the ChangeNumber managed by this list.
 ChangeNumber getChangeNumber()
          Get the ChangeNumber of this Ack Message List.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AckMessageList

public AckMessageList(ChangeNumber changeNumber,
                      int numExpectedAcks)
Creates a new AckMessageList for a given ChangeNumber.

Parameters:
changeNumber - The ChangeNumber for which the ack list is created.
numExpectedAcks - The number of acks waited before acking the original change.
Method Detail

getChangeNumber

public ChangeNumber getChangeNumber()
Get the ChangeNumber of this Ack Message List.

Returns:
Returns the changeNumber.

addAck

public void addAck(short serverId)
Add an ack from a given LDAP server to the ack list.

Parameters:
serverId - the identifier of the LDAP server.

completed

public boolean completed()
This method can be used to check if all acks have been received for the ChangeNumber managed by this list.

Returns:
A boolean indicating if all acks have been received for the ChangeNumber managed by this list.