|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.mitosis.common.DefaultCSN
public class DefaultCSN
A default implementation of CSN
.
Constructor Summary | |
---|---|
DefaultCSN(byte[] value)
Creates a new instance of SimpleCSN from the serialized data |
|
DefaultCSN(long timestamp,
java.lang.String replicaId,
int operationSequence)
Creates a new instance. |
|
DefaultCSN(java.lang.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(java.lang.Object o)
Indicates whether some other object is "equal to" this one |
int |
getOperationSequence()
Returns sequence number of modification. |
java.lang.String |
getReplicaId()
Returns replica ID. |
long |
getTimestamp()
Returns GMT timestamp of modification. |
int |
hashCode()
Returns a hash code value for the object. |
byte[] |
toBytes()
Get the CSN as a byte array. |
java.lang.String |
toOctetString()
Return the CSN as a formated string. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultCSN(long timestamp, java.lang.String replicaId, int operationSequence)
timestamp
- GMT timestamp of modificationreplicaId
- Replica ID where modification occurred ([-_A-Za-z0-9]{1,16})operationSequence
- Operation sequencepublic DefaultCSN(java.lang.String value) throws InvalidCSNException
value
- The String containing the CSN
InvalidCSNException
public DefaultCSN(byte[] value)
value
- The byte array which contains the serialized CSNMethod Detail |
---|
public java.lang.String toOctetString()
toOctetString
in interface CSN
public byte[] toBytes()
toBytes
in interface CSN
public long getTimestamp()
CSN
getTimestamp
in interface CSN
public java.lang.String getReplicaId()
CSN
getReplicaId
in interface CSN
public int getOperationSequence()
CSN
getOperationSequence
in interface CSN
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- 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 java.lang.Comparable<CSN>
o
- the Object to be compared.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |