|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.replication.common.ServerState
public class ServerState
ServerState class. This object is used to store the last update seen on this server from each server. It is exchanged with the replication servers at connection establishment time.
Constructor Summary | |
---|---|
ServerState()
Creates a new empty ServerState. |
|
ServerState(byte[] in,
int pos,
int endpos)
Creates a new ServerState object from its encoded form. |
Method Summary | |
---|---|
void |
clear()
Empty the ServerState. |
boolean |
cover(ServerState covered)
Check that all the ChangeNumbers in the covered serverState are also in this serverState. |
ServerState |
duplicate()
Make a duplicate of this state. |
byte[] |
getBytes()
Encode this ServerState object and return its byte array representation. |
ChangeNumber |
getMaxChangeNumber(short serverId)
Get the largest ChangeNumber seen for a given LDAP server ID. |
boolean |
isEmpty()
Tests if the state is empty. |
java.util.Iterator<java.lang.Short> |
iterator()
|
java.util.ArrayList<ASN1OctetString> |
toASN1ArrayList()
Return an ArrayList of ANS1OctetString encoding the ChangeNumbers contained in the ServerState. |
java.lang.String |
toString()
Return the text representation of ServerState. |
java.util.Set<java.lang.String> |
toStringSet()
return a Set of String usable as a textual representation of a Server state. |
boolean |
update(ChangeNumber changeNumber)
Update the Server State with a ChangeNumber. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ServerState()
public ServerState(byte[] in, int pos, int endpos) throws java.util.zip.DataFormatException
in
- The byte array containing the encoded ServerState form.pos
- The position in the byte array where the encoded ServerState
starts.endpos
- The position in the byte array where the encoded ServerState
ends.
java.util.zip.DataFormatException
- If the encoded form was not correct.Method Detail |
---|
public void clear()
public boolean update(ChangeNumber changeNumber)
changeNumber
- the committed ChangeNumber.
public java.util.Set<java.lang.String> toStringSet()
public java.util.ArrayList<ASN1OctetString> toASN1ArrayList()
public java.lang.String toString()
toString
in class java.lang.Object
public ChangeNumber getMaxChangeNumber(short serverId)
serverId
- : the server ID
public byte[] getBytes() throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
- if UTF8 is not supported by the JVM.public java.util.Iterator<java.lang.Short> iterator()
iterator
in interface java.lang.Iterable<java.lang.Short>
public boolean cover(ServerState covered)
covered
- The ServerState that needs to be checked.
public boolean isEmpty()
public ServerState duplicate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |