Package org.opends.server.controls
Class ReplicatedRequestControl
java.lang.Object
org.opends.server.controls.ReplicatedRequestControl
- All Implemented Interfaces:
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
Modifier and TypeFieldDescriptionstatic final ControlDecoder<ReplicatedRequestControl>
The Control Decoder that can be used to decode this control.static final String
OID of the replication context control. -
Constructor Summary
ConstructorDescriptionReplicatedRequestControl
(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
Modifier and TypeMethodDescriptionboolean
getAlias()
Returns the control "friendly name" alias for the control.getCSN()
Returns the CSN.Returns the entry UUID.getOid()
Returns the numeric OID associated with this control.Returns the additional UUID.static ReplicatedRequestControl
getReplicatedRequestControl
(Request request) Returns the replicated request control from the provided request.getValue()
Returns the value, if any, associated with this control.int
hashCode()
boolean
hasValue()
Returnstrue
if this control has a value.boolean
Returnstrue
if it is unacceptable to perform the operation without applying the semantics of this control.Convert this control to anAddContext
.Convert this control to aDeleteContext
.Convert this control to aModifyContext
.Convert this control to aModifyDnContext
.toString()
-
Field Details
-
OID
OID of the replication context control.- See Also:
-
DECODER
The Control Decoder that can be used to decode this control.
-
-
Constructor Details
-
ReplicatedRequestControl
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
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 Details
-
getReplicatedRequestControl
Returns the replicated request control from the provided request.- Parameters:
request
- The request- Returns:
- the replicated request control or
null
if there is none
-
getOid
Description copied from interface:Control
Returns the numeric OID associated with this control. -
toAddContext
Convert this control to anAddContext
.- Returns:
- the add context
-
toDeleteContext
Convert this control to aDeleteContext
.- Returns:
- the delete context
-
toModifyContext
Convert this control to aModifyContext
.- Returns:
- the modify context
-
toModifyDNContext
Convert this control to aModifyDnContext
.- Returns:
- the modify Dn context
-
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
Returns the CSN.- Returns:
- the non-
null
CSN
-
getEntryUuid
Returns the entry UUID.- Returns:
- the non-
null
entry 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.
-
equals
-
hashCode
public int hashCode() -
toString
-
getAlias
Description copied from interface:Control
Returns the control "friendly name" alias for the control.
-