Package org.opends.server.controls
Class ReplicatedRequestControl
- java.lang.Object
-
- org.opends.server.controls.ReplicatedRequestControl
-
- All Implemented Interfaces:
Control
public final class ReplicatedRequestControl extends Object implements Control
Control that provides some replication context to requests.The replication context provides a CSN, an entry UUID and an additional UUID.
Note: the use of this control was the fastest way to make things work. This should be only a temporary solution until we find a better way to handle this. To get a better idea of the issue:
- before, we had an operation, which allow to add attachments.
- now, with a request, there is no easy way to provide additional information.
-
-
Field Summary
Fields Modifier and Type Field Description static ControlDecoder<ReplicatedRequestControl>DECODERThe Control Decoder that can be used to decode this control.static StringOIDOID of the replication context control.
-
Constructor Summary
Constructors Constructor Description ReplicatedRequestControl(boolean isCritical, CSN csn, UUID entryUuid)Constructs a new control.ReplicatedRequestControl(boolean isCritical, CSN csn, UUID entryUuid, UUID parentUuid)Constructs a new control.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)CSNgetCSN()Returns the CSN.UUIDgetEntryUuid()Returns the entry UUID.StringgetOid()Returns the numeric OID associated with this control.UUIDgetParentUuid()Returns the additional UUID.ByteStringgetValue()Returns the value, if any, associated with this control.inthashCode()booleanhasValue()Returnstrueif this control has a value.booleanisCritical()Returnstrueif it is unacceptable to perform the operation without applying the semantics of this control.AddContexttoAddContext()Convert this control to anAddContext.DeleteContexttoDeleteContext()Convert this control to aDeleteContext.ModifyContexttoModifyContext()Convert this control to aModifyContext.ModifyDnContexttoModifyDNContext()Convert this control to aModifyDnContext.StringtoString()
-
-
-
Field Detail
-
OID
public static final String OID
OID of the replication context control.- See Also:
- Constant Field Values
-
DECODER
public static final ControlDecoder<ReplicatedRequestControl> DECODER
The Control Decoder that can be used to decode this control.
-
-
Constructor Detail
-
ReplicatedRequestControl
public ReplicatedRequestControl(boolean isCritical, CSN csn, UUID entryUuid, UUID parentUuid)Constructs a new control.- Parameters:
isCritical- Indicates whether support for this control should be considered a critical part of the server processing.csn- the non-nullCSN.entryUuid- the non-nullUUID of the entry.parentUuid- the parent UUID that may be provided for Add and ModifyDN requests
-
ReplicatedRequestControl
public ReplicatedRequestControl(boolean isCritical, CSN csn, UUID entryUuid)Constructs a new control.- Parameters:
isCritical- Indicates whether support for this control should be considered a critical part of the server processing.csn- the non-nullCSN.entryUuid- the non-nullUUID of the entry.
-
-
Method Detail
-
getOid
public String getOid()
Description copied from interface:ControlReturns the numeric OID associated with this control.
-
toAddContext
public AddContext toAddContext()
Convert this control to anAddContext.- Returns:
- the add context
-
toDeleteContext
public DeleteContext toDeleteContext()
Convert this control to aDeleteContext.- Returns:
- the delete context
-
toModifyContext
public ModifyContext toModifyContext()
Convert this control to aModifyContext.- Returns:
- the modify context
-
toModifyDNContext
public ModifyDnContext toModifyDNContext()
Convert this control to aModifyDnContext.- Returns:
- the modify Dn context
-
getValue
public ByteString getValue()
Description copied from interface:ControlReturns the value, if any, associated with this control. Its format is defined by the specification of this control.
-
hasValue
public boolean hasValue()
Description copied from interface:ControlReturnstrueif this control has a value. In some circumstances it may be useful to determine if a control has a value, without actually calculating the value and incurring any performance costs.
-
getCSN
public CSN getCSN()
Returns the CSN.- Returns:
- the non-
nullCSN
-
getEntryUuid
public UUID getEntryUuid()
Returns the entry UUID.- Returns:
- the non-
nullentry UUID
-
getParentUuid
public UUID getParentUuid()
Returns the additional UUID.- Returns:
- the additional UUID
-
isCritical
public boolean isCritical()
Description copied from interface:ControlReturnstrueif it is unacceptable to perform the operation without applying the semantics of this control.The criticality field only has meaning in controls attached to request messages (except UnbindRequest). For controls attached to response messages and the UnbindRequest, the criticality field SHOULD be
false, and MUST be ignored by the receiving protocol peer. A value oftrueindicates that it is unacceptable to perform the operation without applying the semantics of the control.- Specified by:
isCriticalin interfaceControl- Returns:
trueif this control must be processed by the Directory Server, orfalseif it can be ignored.
-
-