Class ModifyMsg
- 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
-
- org.opends.server.replication.protocol.ModifyMsg
-
- All Implemented Interfaces:
Comparable<UpdateMsg>
public final class ModifyMsg extends ModifyCommonMsg
Message used to send Modify information.
-
-
Field Summary
-
Fields inherited from class org.opends.server.replication.protocol.ReplicationMsg
COMPACT_MASK, COMPACT_TYPE_ADD, COMPACT_TYPE_DELETE, COMPACT_TYPE_MODIFY, COMPACT_TYPE_MODIFY_DN, COMPACT_TYPE_REPLICA_OFFLINE, MSG_TYPE_DISK_ENCODING
-
-
Constructor Summary
Constructors Constructor Description ModifyMsg(CSN csn, Dn dn, UUID entryUUID, byte[] encodedMods, byte[] encodedEclIncludes)Creates a new Modify message using the provided information.ModifyMsg(CSN csn, Dn dn, UUID entryUUID, List<Modification> mods)Creates a new Modify message using the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <E extends Exception>
voidaccept(UpdateMsgVisitor<E> visitor)Applies anUpdateMsgVisitorto thisUpdateMsg.ModifyRequestcreateRequest(Dn newDN)Create a request from this message using the provided DN.byte[]getBytesLatest(short protocolVersion)Get the byte array representation of this message.intsize()Return the number of bytes used by this message.StringtoString()-
Methods inherited from class org.opends.server.replication.protocol.ModifyCommonMsg
appendEncodedMods, getMods, setMods
-
Methods inherited from class org.opends.server.replication.protocol.LDAPUpdateMsg
appendEclIncludes, createRequest, generateMsg, getBytes, getDN, getEclIncludes, getEntryUUID, setDN, setEclIncludes, toJson
-
Methods inherited from class org.opends.server.replication.protocol.UpdateMsg
compareTo, equals, getBytes, getCSN, getVersion, hashCode
-
Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg
decodeMsg, isRetryable
-
-
-
-
Constructor Detail
-
ModifyMsg
public ModifyMsg(CSN csn, Dn dn, UUID entryUUID, List<Modification> mods)
Creates a new Modify message using the provided information.- Parameters:
csn- The CSN for the operation.dn- The baseDN of the operation.entryUUID- The unique id of the entry on which the modification needs to apply.mods- The mod of the operation.
-
ModifyMsg
public ModifyMsg(CSN csn, Dn dn, UUID entryUUID, byte[] encodedMods, byte[] encodedEclIncludes)
Creates a new Modify message using the provided information.- Parameters:
csn- The CSN for the operation.dn- The baseDN of the operation.entryUUID- The unique id of the entry on which the modification needs to apply.encodedMods- The encodedMods of the operation.encodedEclIncludes- The encodedEclIncludes of the operation.
-
-
Method Detail
-
accept
public <E extends Exception> void accept(UpdateMsgVisitor<E> visitor) throws E extends Exception
Description copied from class:UpdateMsgApplies anUpdateMsgVisitorto thisUpdateMsg.- Specified by:
acceptin classUpdateMsg- Type Parameters:
E- The type of the exception thrown by the visitor method if it fails, orNeverThrowsExceptionif the visitor cannot fail.- Parameters:
visitor- The message visitor.- Throws:
E- If the visitor failed.E extends Exception
-
createRequest
public ModifyRequest createRequest(Dn newDN) throws IOException
Description copied from class:LDAPUpdateMsgCreate a request from this message using the provided DN.- Specified by:
createRequestin classLDAPUpdateMsg- Parameters:
newDN- the DN to use when creating the request.- Returns:
- the created request
- Throws:
LdapException- In case of LDAP decoding exceptionIOException- In case of ASN1 decoding exception
-
size
public int size()
Description copied from class:UpdateMsgReturn the number of bytes used by this message.- Specified by:
sizein classLDAPUpdateMsg- Returns:
- The number of bytes used by this message.
-
getBytesLatest
public byte[] getBytesLatest(short protocolVersion)
Description copied from class:LDAPUpdateMsgGet the byte array representation of this message.This uses the provided version number which must be at least version 4.
- Specified by:
getBytesLatestin classLDAPUpdateMsg- Parameters:
protocolVersion- the actual protocol version to encode into- Returns:
- The byte array representation of this Message.
-
-