Class DeleteMsg
- 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.DeleteMsg
-
- All Implemented Interfaces:
Comparable<UpdateMsg>
public final class DeleteMsg extends LDAPUpdateMsg
Object used when sending delete information to replication servers.
-
-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <E extends Exception>
voidaccept(UpdateMsgVisitor<E> visitor)
Applies anUpdateMsgVisitor
to thisUpdateMsg
.DeleteRequest
createRequest(Dn newDN)
Create a request from this message using the provided DN.byte[]
getBytesLatest(short protocolVersion)
Get the byte array representation of this message.String
getInitiatorsName()
Get the initiator's name of this change.boolean
isSubtreeDelete()
Get the subtree flag.void
setInitiatorsName(String iname)
Set the initiator's name of this change.void
setSubtreeDelete(boolean subtreeDelete)
Set the subtree flag.int
size()
Return the number of bytes used by this message.String
toString()
-
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
-
DeleteMsg
public DeleteMsg(Dn dn, CSN csn, UUID entryUUID)
Creates a new delete message.- Parameters:
dn
- The dn with which the message must be created.csn
- The CSN with which the message must be created.entryUUID
- The unique id with which the message must be created.
-
DeleteMsg
public DeleteMsg(CSN csn, Dn dn, UUID entryUUID, String initiatorsName, byte[] encodedEclIncludes, boolean subtreeDelete)
Creates a new delete message.- Parameters:
csn
- The CSN with which the message must be created.dn
- The dn with which the message must be created.entryUUID
- The unique id with which the message must be created.initiatorsName
- The initiator's name of this change.encodedEclIncludes
- Encoded form of entry attributes.subtreeDelete
- Whether the delete operation is a subtree delete.
-
-
Method Detail
-
accept
public <E extends Exception> void accept(UpdateMsgVisitor<E> visitor) throws E extends Exception
Description copied from class:UpdateMsg
Applies anUpdateMsgVisitor
to thisUpdateMsg
.- Specified by:
accept
in classUpdateMsg
- Type Parameters:
E
- The type of the exception thrown by the visitor method if it fails, orNeverThrowsException
if the visitor cannot fail.- Parameters:
visitor
- The message visitor.- Throws:
E
- If the visitor failed.E extends Exception
-
createRequest
public DeleteRequest createRequest(Dn newDN)
Description copied from class:LDAPUpdateMsg
Create a request from this message using the provided DN.- Specified by:
createRequest
in classLDAPUpdateMsg
- Parameters:
newDN
- the DN to use when creating the request.- Returns:
- the created request
-
getBytesLatest
public byte[] getBytesLatest(short protocolVersion)
Description copied from class:LDAPUpdateMsg
Get the byte array representation of this message.This uses the provided version number which must be at least version 4.
- Specified by:
getBytesLatest
in classLDAPUpdateMsg
- Parameters:
protocolVersion
- the actual protocol version to encode into- Returns:
- The byte array representation of this Message.
-
size
public int size()
Description copied from class:UpdateMsg
Return the number of bytes used by this message.- Specified by:
size
in classLDAPUpdateMsg
- Returns:
- The number of bytes used by this message.
-
setInitiatorsName
public void setInitiatorsName(String iname)
Set the initiator's name of this change.- Parameters:
iname
- the initiator's name.
-
getInitiatorsName
public String getInitiatorsName()
Get the initiator's name of this change.- Returns:
- the initiator's name.
-
setSubtreeDelete
public void setSubtreeDelete(boolean subtreeDelete)
Set the subtree flag.- Parameters:
subtreeDelete
- the subtree flag.
-
isSubtreeDelete
public boolean isSubtreeDelete()
Get the subtree flag.- Returns:
- the subtree flag.
-
-