org.opends.server.replication.plugin
Class FakeOperation

java.lang.Object
  extended by org.opends.server.replication.plugin.FakeOperation
Direct Known Subclasses:
ModifyFakeOperation

public abstract class FakeOperation
extends java.lang.Object

This class if used to build fake Operation from the historical information that stay in the entry in the database. This is usefull when a LDAP server can't find a LDAP server that has already seen all its changes and therefore need to retransmit them

Author:
Gilles Bellaton

Constructor Summary
FakeOperation(ChangeNumber changeNumber)
          Creates a new FakeOperation using the provided ChangeNumber.
 
Method Summary
abstract  void addModification(Modification mod)
          Add a modification to the list of modification included in this fake operation.
abstract  ReplicationMessage generateMessage()
          Generate a ReplicationMessage from this fake operation.
 ChangeNumber getChangeNumber()
          Get the ChangeNumber.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FakeOperation

public FakeOperation(ChangeNumber changeNumber)
Creates a new FakeOperation using the provided ChangeNumber.

Parameters:
changeNumber - The ChangeNumber to use to build the FakeOperation.
Method Detail

getChangeNumber

public ChangeNumber getChangeNumber()
Get the ChangeNumber.

Returns:
Returns the changeNumber.

generateMessage

public abstract ReplicationMessage generateMessage()
Generate a ReplicationMessage from this fake operation. The ReplicationMessage is used to send the informations about this operation to the other servers.

Returns:
A ReplicationMessage that can be used to send information about this operation to remote servers.

addModification

public abstract void addModification(Modification mod)
Add a modification to the list of modification included in this fake operation.

Parameters:
mod - A modification that must be adde to the list of modifications included in this fake operation.