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>
DECODER
The Control Decoder that can be used to decode this control.static String
OID
OID 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 boolean
equals(Object obj)
CSN
getCSN()
Returns the CSN.UUID
getEntryUuid()
Returns the entry UUID.String
getOid()
Returns the numeric OID associated with this control.UUID
getParentUuid()
Returns the additional UUID.ByteString
getValue()
Returns the value, if any, associated with this control.int
hashCode()
boolean
hasValue()
Returnstrue
if this control has a value.boolean
isCritical()
Returnstrue
if it is unacceptable to perform the operation without applying the semantics of this control.AddContext
toAddContext()
Convert this control to anAddContext
.DeleteContext
toDeleteContext()
Convert this control to aDeleteContext
.ModifyContext
toModifyContext()
Convert this control to aModifyContext
.ModifyDnContext
toModifyDNContext()
Convert this control to aModifyDnContext
.String
toString()
-
-
-
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-null
CSN.entryUuid
- the non-null
UUID 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-null
CSN.entryUuid
- the non-null
UUID of the entry.
-
-
Method Detail
-
getOid
public String getOid()
Description copied from interface:Control
Returns 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:Control
Returns 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:Control
Returnstrue
if 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-
null
CSN
-
getEntryUuid
public UUID getEntryUuid()
Returns the entry UUID.- Returns:
- the non-
null
entry UUID
-
getParentUuid
public UUID getParentUuid()
Returns the additional UUID.- Returns:
- the additional UUID
-
isCritical
public boolean isCritical()
Description copied from interface:Control
Returnstrue
if 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 oftrue
indicates that it is unacceptable to perform the operation without applying the semantics of the control.- Specified by:
isCritical
in interfaceControl
- Returns:
true
if this control must be processed by the Directory Server, orfalse
if it can be ignored.
-
-