|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.mitosis.common.CSNVector
public class CSNVector
Creates a set of CSNs, which is defined in LDUP specification.
Each CSN in the same CSNVector has different
Replica Id from each other. Its data structure is
similar to a Map whose key is the Replica Id.
CSNVector is usually used to represent 'Update Vector (UV)' and
'Purge Vector (PV)'. Please refer to the LDUP specification and other
Mitosis classes such as ReplicationClientContextHandler.
| Constructor Summary | |
|---|---|
CSNVector()
Creates a new empty instance. |
|
| Method Summary | |
|---|---|
CSNVector |
clone()
Creates a deep copy of this vector and returns it. |
boolean |
equals(java.lang.Object object)
Returns true if and if only the specified object is a CSNVector and contains the CSNs with the same values. |
CSN |
getCSN(java.lang.String replicaId)
Returns the CSN with the specified replicaId from
this vector. |
java.util.Set<java.lang.String> |
getReplicaIds()
Returns the Set of the ReplicaIds extracted from
the CSNs in this vector. |
int |
hashCode()
Returns the hash code of this vector, calculated from each CSN
element. |
CSN |
removeCSN(java.lang.String replicaId)
Removed the CSN with the specified replicaId from
this vector and returns the removed CSN. |
void |
setAllCSN(CSNVector vector)
Adds all CSNs that the specified vector contains to
this vector. |
void |
setCSN(CSN csn)
Adds the specified csn to this vector. |
int |
size()
Returns the number of CSNs that this vector contains. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CSNVector()
| Method Detail |
|---|
public void setCSN(CSN csn)
CSN with the same ReplicaId, it is replaced by
the specified csn.
public void setAllCSN(CSNVector vector)
CSNs that the specified vector contains to
this vector. If there's a CSN with the same ReplicaId
in this vector, it is replaced by the CSN in the specified
vector.
public CSN getCSN(java.lang.String replicaId)
CSN with the specified replicaId from
this vector.
public CSN removeCSN(java.lang.String replicaId)
CSN with the specified replicaId from
this vector and returns the removed CSN.
public java.util.Set<java.lang.String> getReplicaIds()
Set of the ReplicaIds extracted from
the CSNs in this vector.
public int size()
CSNs that this vector contains.
public boolean equals(java.lang.Object object)
CSNVector and contains the CSNs with the same values.
equals in class java.lang.Objectpublic int hashCode()
CSN
element.
hashCode in class java.lang.Objectpublic CSNVector clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||