|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.replication.protocol.ReplicationMessage
org.opends.server.replication.protocol.UpdateMessage
public abstract class UpdateMessage
Abstract class that must be extended to define a message used for sending Updates between servers.
Constructor Summary | |
---|---|
protected |
UpdateMessage(byte[] in)
Creates a new UpdateMessage from an ecoded byte array. |
|
UpdateMessage(OperationContext ctx,
java.lang.String dn)
Creates a new UpdateMessage with the given informations. |
Method Summary | |
---|---|
int |
compareTo(UpdateMessage msg)
|
AbstractOperation |
createOperation(InternalClientConnection conn)
Create and Operation from the message. |
abstract AbstractOperation |
createOperation(InternalClientConnection conn,
java.lang.String newDn)
Create and Operation from the message using the provided DN. |
int |
decodeHeader(byte type,
byte[] encodedMsg)
Decode the Header part of this Update Message, and check its type. |
byte[] |
encodeHeader(byte type,
int additionalLength)
Encode the common header for all the UpdateMessage. |
boolean |
equals(java.lang.Object obj)
|
static UpdateMessage |
generateMsg(PostOperationOperation op,
boolean isAssured)
Generates an Update Message which the provided information. |
ChangeNumber |
getChangeNumber()
Get the ChangeNumber from the message. |
java.lang.String |
getDn()
Get the DN on which the operation happened. |
java.lang.String |
getUniqueId()
Get the Unique Identifier of the entry on which the operation happened. |
int |
hashCode()
|
boolean |
isAssured()
Get a boolean indicating if the Update must be processed as an Asynchronous or as an assured replication. |
void |
setAssured()
Set the Update message as an assured message. |
void |
setDn(java.lang.String dn)
Set the DN. |
Methods inherited from class org.opends.server.replication.protocol.ReplicationMessage |
---|
addByteArray, generateMsg, getBytes, getNextLength |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UpdateMessage(OperationContext ctx, java.lang.String dn)
ctx
- The replication Context of the operation for which the
update message must be created,.dn
- The dn of the entry on which the change
that caused the creation of this object happenedprotected UpdateMessage(byte[] in) throws java.util.zip.DataFormatException, java.io.UnsupportedEncodingException
in
- The encoded byte array containind the UpdateMessage.
java.util.zip.DataFormatException
- if the encoded byte array is not valid.
java.io.UnsupportedEncodingException
- if UTF-8 is not supprted.Method Detail |
---|
public static UpdateMessage generateMsg(PostOperationOperation op, boolean isAssured)
op
- The operation for which the message must be created.isAssured
- flag indicating if the operation is an assured operation.
public ChangeNumber getChangeNumber()
public java.lang.String getDn()
public void setDn(java.lang.String dn)
dn
- The dn that must now be used for this message.public java.lang.String getUniqueId()
public boolean isAssured()
public void setAssured()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(UpdateMessage msg)
compareTo
in interface java.lang.Comparable<UpdateMessage>
public AbstractOperation createOperation(InternalClientConnection conn) throws LDAPException, ASN1Exception, java.util.zip.DataFormatException
conn
- connection to use when creating the message
LDAPException
- In case of LDAP decoding exception.
ASN1Exception
- In case of ASN1 decoding exception.
java.util.zip.DataFormatException
- In case of bad msg format.public abstract AbstractOperation createOperation(InternalClientConnection conn, java.lang.String newDn) throws LDAPException, ASN1Exception, java.util.zip.DataFormatException
conn
- connection to use when creating the message.newDn
- the DN to use when creating the operation.
LDAPException
- In case of LDAP decoding exception.
ASN1Exception
- In case of ASN1 decoding exception.
java.util.zip.DataFormatException
- In case of bad msg format.public byte[] encodeHeader(byte type, int additionalLength) throws java.io.UnsupportedEncodingException
type
- the type of UpdateMessage to encode.additionalLength
- additional length needed to encode the remaining
part of the UpdateMessage.
java.io.UnsupportedEncodingException
- if UTF-8 is not supported.public int decodeHeader(byte type, byte[] encodedMsg) throws java.util.zip.DataFormatException
type
- The type of this Update Message.encodedMsg
- the encoded form of the UpdateMessage.
java.util.zip.DataFormatException
- if the encodedMsg does not contain a valid
common header.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |