org.apache.directory.server.ldap.replication
Class ReplicaEventMessage

java.lang.Object
  extended by org.apache.directory.server.ldap.replication.ReplicaEventMessage

public class ReplicaEventMessage
extends Object

A place holder storing an Entry and the operation applied on it

Author:
Apache Directory Project

Constructor Summary
ReplicaEventMessage(org.apache.directory.api.ldap.model.message.controls.ChangeType changeType, org.apache.directory.api.ldap.model.entry.Entry entry)
          Create a new ReplicaEvent instance for a Add/Delete+Modify operation
 
Method Summary
 org.apache.directory.api.ldap.model.message.controls.ChangeType getChangeType()
           
 org.apache.directory.api.ldap.model.entry.Entry getEntry()
           
 boolean isEventOlderThan(String csn)
          checks if the event's CSN is older than the given CSN
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicaEventMessage

public ReplicaEventMessage(org.apache.directory.api.ldap.model.message.controls.ChangeType changeType,
                           org.apache.directory.api.ldap.model.entry.Entry entry)
Create a new ReplicaEvent instance for a Add/Delete+Modify operation

Parameters:
changeType - The change type
entry - The entry
Method Detail

getChangeType

public org.apache.directory.api.ldap.model.message.controls.ChangeType getChangeType()
Returns:
The changeType

getEntry

public org.apache.directory.api.ldap.model.entry.Entry getEntry()
Returns:
The stored Entry

isEventOlderThan

public boolean isEventOlderThan(String csn)
                         throws org.apache.directory.api.ldap.model.exception.LdapException
checks if the event's CSN is older than the given CSN

Parameters:
csn - the CSN
Returns:
true if the event's CSN is older than the given CSN
Throws:
Exception - if there are any extreme conditions like a null entry or missing entryCSN attribute.
org.apache.directory.api.ldap.model.exception.LdapException


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.