Class ModifyCommonMsg
- java.lang.Object
-
- org.opends.server.replication.protocol.ReplicationMsg
-
- org.opends.server.replication.protocol.UpdateMsg
-
- org.opends.server.replication.protocol.LDAPUpdateMsg
-
- org.opends.server.replication.protocol.ModifyCommonMsg
-
- All Implemented Interfaces:
Comparable<UpdateMsg>
- Direct Known Subclasses:
ModifyDNMsg,ModifyMsg
public abstract class ModifyCommonMsg extends LDAPUpdateMsg
This class holds every common code for the modify messages (mod, moddn).
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]encodedModsThe modifications kept encoded in the message.-
Fields inherited from class org.opends.server.replication.protocol.LDAPUpdateMsg
bytes, dn, encodedEclIncludes, entryUUID
-
Fields inherited from class org.opends.server.replication.protocol.UpdateMsg
assuredFlag, assuredMode, csn, protocolVersion, safeDataLevel
-
Fields inherited from class org.opends.server.replication.protocol.ReplicationMsg
MSG_TYPE_DISK_ENCODING
-
-
Constructor Summary
Constructors Constructor Description ModifyCommonMsg()Creates a new ModifyCommonMsg.ModifyCommonMsg(CSN csn, String entryUUID, DN dn)Creates a new ModifyCommonMsg with the given informations.ModifyCommonMsg(OperationContext ctx, DN dn)Creates a new ModifyCommonMsg with the given informations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<Modification>decodeMods(byte[] in)Decode mods from the provided byte array.protected List<RawModification>decodeRawMods(byte[] in)Decode raw mods from the provided byte array.protected byte[]encodeMods(List<Modification> mods)Encode an ArrayList of Modification into a byte[] suitable for storage in a database or send on the network.List<Modification>getMods()Get the Modifications associated to the UpdateMsg to the provided value.voidsetMods(List<Modification> mods)Set the Modification associated to the UpdateMsg to the provided value.-
Methods inherited from class org.opends.server.replication.protocol.LDAPUpdateMsg
createOperation, createOperation, encode, encodeHeader, generateMsg, getBytes, getBytes_V1, getBytes_V23, getBytes_V45, getDN, getEclIncludes, getEntryUUID, headerSize, setDN, setEclIncludes, size
-
Methods inherited from class org.opends.server.replication.protocol.UpdateMsg
compareTo, contributesToDomainState, decodeHeader, equals, getAssuredMode, getBytes, getCSN, getPayload, getSafeDataLevel, getVersion, hashCode, isAssured, setAssured, setAssuredMode, setSafeDataLevel
-
Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg
generateMsg, isEncodableFor
-
-
-
-
Constructor Detail
-
ModifyCommonMsg
public ModifyCommonMsg()
Creates a new ModifyCommonMsg.
-
ModifyCommonMsg
public ModifyCommonMsg(OperationContext ctx, DN dn)
Creates a new ModifyCommonMsg with the given informations.- Parameters:
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 happened
-
ModifyCommonMsg
public ModifyCommonMsg(CSN csn, String entryUUID, DN dn)
Creates a new ModifyCommonMsg with the given informations.- Parameters:
csn- The CSN of the operation for which the UpdateMessage is created.entryUUID- The Unique identifier of the entry that is updated by the operation for which the UpdateMessage is created.dn- The DN of the entry on which the change that caused the creation of this object happened
-
-
Method Detail
-
setMods
public void setMods(List<Modification> mods)
Set the Modification associated to the UpdateMsg to the provided value.- Parameters:
mods- The new Modification associated to this ModifyMsg.
-
getMods
public List<Modification> getMods() throws IOException, LDAPException
Get the Modifications associated to the UpdateMsg to the provided value.- Returns:
- the list of modifications
- Throws:
LDAPException- In case of LDAP decoding exceptionIOException- In case of ASN1 decoding exception
-
encodeMods
protected byte[] encodeMods(List<Modification> mods)
Encode an ArrayList of Modification into a byte[] suitable for storage in a database or send on the network.- Parameters:
mods- the ArrayList of Modification to be encoded.- Returns:
- The encoded modifications.
-
decodeMods
protected List<Modification> decodeMods(byte[] in) throws IOException, LDAPException
Decode mods from the provided byte array.- Parameters:
in- The provided byte array.- Returns:
- The decoded mods.
- Throws:
IOException- when occurs.LDAPException- when occurs.
-
decodeRawMods
protected List<RawModification> decodeRawMods(byte[] in) throws LDAPException, IOException
Decode raw mods from the provided byte array.- Parameters:
in- The provided byte array.- Returns:
- The decoded mods.
- Throws:
IOException- when occurs.LDAPException- when occurs.
-
-