|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.model.csn.Csn
public class 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-ietf-ldup-model-09. The CSN syntax is :
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.::= # # # ::= A GMT based time, YYYYmmddHHMMSS.uuuuuuZ ::= [000000-ffffff] ::= [000-fff] ::= [000000-ffffff]
| Constructor Summary | |
|---|---|
Csn(long timestamp,
int changeCount,
int replicaId,
int operationNumber)
Creates a new instance. |
|
Csn(String value)
Creates a new instance of SimpleCSN from a String. |
|
| Method Summary | |
|---|---|
int |
compareTo(Csn csn)
Compares this object with the specified object for order. |
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one |
byte[] |
getBytes()
Get the CSN as a byte array. |
int |
getChangeCount()
|
int |
getOperationNumber()
|
int |
getReplicaId()
|
long |
getTimestamp()
|
int |
hashCode()
Returns a hash code value for the object. |
static boolean |
isValid(String value)
Check if the given String is a valid CSN. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Csn(long timestamp,
int changeCount,
int replicaId,
int operationNumber)
timestamp - GMT timestamp of modificationchangeCount - The operation incrementreplicaId - Replica ID where modification occurred ([-_A-Za-z0-9]{1,16})operationNumber - Operation number in a modification operation
public Csn(String value)
throws InvalidCSNException
value - The String containing the CSN
InvalidCSNException - if the value doesn't contain a valid CSN| Method Detail |
|---|
public static boolean isValid(String value)
value - The String to check
true if the String is a valid CSNpublic byte[] getBytes()
public long getTimestamp()
public int getChangeCount()
public int getReplicaId()
public int getOperationNumber()
public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Objecto - the reference object with which to compare.
true if this object is the same as the obj argument;
false otherwise.public int compareTo(Csn csn)
compareTo in interface Comparable<Csn>csn - the Object to be compared.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||