|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.replication.plugin.PendingChanges
public class PendingChanges
This class is use to store the list of local operations currently in progress and not yet committed in the database. It is used to make sure that operations are sent to the Replication Server in the order defined by their ChangeNumber. It is also used to update the ServerState at the appropriate time. On object of this class is instanciated for each ReplicationDomain.
Constructor Summary | |
---|---|
PendingChanges(ChangeNumberGenerator changeNumberGenerator,
ReplicationBroker broker,
ServerState state)
Creates a new PendingChanges using the provided ChangeNumberGenerator. |
Method Summary | |
---|---|
void |
commit(ChangeNumber changeNumber)
Mark an update message as committed. |
void |
commit(ChangeNumber changeNumber,
UpdateMessage msg)
Mark an update message as committed. |
int |
pushCommittedChanges()
Push all committed local changes to the replicationServer service. |
ChangeNumber |
putLocalOperation(PluginOperation operation)
Add a new UpdateMessage to the pending list from the provided local operation. |
UpdateMessage |
remove(ChangeNumber changeNumber)
Remove and return an update form the pending changes list. |
int |
size()
Returns the number of update currently in the list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PendingChanges(ChangeNumberGenerator changeNumberGenerator, ReplicationBroker broker, ServerState state)
changeNumberGenerator
- The ChangeNumberGenerator to use to create
new unique ChangeNumbers.broker
- The Replicationbroker that will be used to send
UpdateMessage.state
- The ServerState that will be updated when UpdateMessage
are committed.Method Detail |
---|
public UpdateMessage remove(ChangeNumber changeNumber)
changeNumber
- The ChangeNumber of the update to remove.
public int size()
public void commit(ChangeNumber changeNumber, UpdateMessage msg)
changeNumber
- The ChangeNumber of the update message that must be
set as committed.msg
- The message associated to the update.public void commit(ChangeNumber changeNumber)
changeNumber
- The ChangeNumber of the update message that must be
set as committed.public ChangeNumber putLocalOperation(PluginOperation operation)
operation
- The local operation for which an UpdateMessage mus
be added in the pending list.
public int pushCommittedChanges()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |