org.apache.directory.mitosis.common
Interface CSN

All Superinterfaces:
java.lang.Comparable<CSN>, java.io.Serializable
All Known Implementing Classes:
DefaultCSN

public interface CSN
extends java.io.Serializable, java.lang.Comparable<CSN>

Represents 'Change Sequence Number' in LDUP specification. A CSN is a composition of a timestamp, a replica ID and a operation sequence number. It's described in http://tools.ietf.org/html/draft-sermersheim-ldap-csn-02. The syntax is :

 ChangeSequenceNumber ::= SEQUENCE {
     time GeneralizedTime,
     timeCount INTEGER (0 ..  MaxInt),
     replicaID UTF8String,
     changeCount INTEGER (0 ..  MaxInt)}
 }
 
It distinguishes a change made on an object on a server, and if two operations take place during the same timeStamp, the operation sequence number makes those operations distinct.

Author:
Apache Directory Project

Method Summary
 int getOperationSequence()
          Returns sequence number of modification.
 java.lang.String getReplicaId()
          Returns replica ID.
 long getTimestamp()
          Returns GMT timestamp of modification.
 byte[] toBytes()
          Returns a byte array representing the CSN
 java.lang.String toOctetString()
          Returns octet-string representation of this CSN.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getTimestamp

long getTimestamp()
Returns GMT timestamp of modification.


getReplicaId

java.lang.String getReplicaId()
Returns replica ID.


getOperationSequence

int getOperationSequence()
Returns sequence number of modification.


toOctetString

java.lang.String toOctetString()
Returns octet-string representation of this CSN.


toBytes

byte[] toBytes()
Returns a byte array representing the CSN



Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.