Class AffinityRequestControl
java.lang.Object
com.unboundid.ldap.sdk.Control
com.unboundid.ldap.sdk.forgerockds.controls.AffinityRequestControl
- All Implemented Interfaces:
Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class AffinityRequestControl
extends Control
This class provides an implementation of a control that can be used to
establish an affinity for one or more operations through a ForgeRock
Directory Proxy Server. The server will attempt to route operations with
the same affinity value to the same backend server.
This request control has an OID of 1.3.6.1.4.1.36733.2.1.5.2, and its value is the desired affinity value (which may be an arbitrary string or set of bytes, and the LDAP SDK may automatically generate an affinity value if none is provided). The criticality may be either true or false.
This request control has an OID of 1.3.6.1.4.1.36733.2.1.5.2, and its value is the desired affinity value (which may be an arbitrary string or set of bytes, and the LDAP SDK may automatically generate an affinity value if none is provided). The criticality may be either true or false.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe OID (1.3.6.1.4.1.36733.2.1.5.2) for the affinity request control. -
Constructor Summary
ConstructorsConstructorDescriptionAffinityRequestControl(boolean isCritical) Creates a new affinity request control with the specified criticality and a randomly generated affinity value.AffinityRequestControl(boolean isCritical, byte[] affinityValue) Creates a new affinity request control with the specified criticality and the provided affinity value.AffinityRequestControl(boolean isCritical, ASN1OctetString affinityValue) Creates a new affinity request control with the specified criticality and the provided affinity value.AffinityRequestControl(boolean isCritical, String affinityValue) Creates a new affinity request control with the specified criticality and the provided affinity value.AffinityRequestControl(Control control) Creates a new affinity request control that is decoded from the provided generic control. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the affinity value for this control.Retrieves the user-friendly name for this control, if available.voidtoString(StringBuilder buffer) Appends a string representation of this LDAP control to the provided buffer.Methods inherited from class com.unboundid.ldap.sdk.Control
decode, decode, decodeControls, decodeJSONControl, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, registerDecodeableControl, toJSONControl, toString, writeTo
-
Field Details
-
AFFINITY_REQUEST_OID
The OID (1.3.6.1.4.1.36733.2.1.5.2) for the affinity request control.- See Also:
-
-
Constructor Details
-
AffinityRequestControl
Creates a new affinity request control with the specified criticality and a randomly generated affinity value.- Parameters:
isCritical- Indicates whether the control should be marked critical.
-
AffinityRequestControl
Creates a new affinity request control with the specified criticality and the provided affinity value.- Parameters:
isCritical- Indicates whether the control should be marked critical.affinityValue- The affinity value to use for the control. It must not benull.
-
AffinityRequestControl
Creates a new affinity request control with the specified criticality and the provided affinity value.- Parameters:
isCritical- Indicates whether the control should be marked critical.affinityValue- The affinity value to use for the control. It must not benull.
-
AffinityRequestControl
Creates a new affinity request control with the specified criticality and the provided affinity value.- Parameters:
isCritical- Indicates whether the control should be marked critical.affinityValue- The affinity value to use for the control. It must not benull.
-
AffinityRequestControl
Creates a new affinity request control that is decoded from the provided generic control.- Parameters:
control- The generic control to be decoded as an affinity request control.- Throws:
LDAPException- If the provided control cannot be decoded as an affinity request control.
-
-
Method Details
-
getAffinityValue
Retrieves the affinity value for this control.- Returns:
- The affinity value for this control.
-
getControlName
Retrieves the user-friendly name for this control, if available. If no user-friendly name has been defined, then the OID will be returned.- Overrides:
getControlNamein classControl- Returns:
- The user-friendly name for this control, or the OID if no user-friendly name is available.
-
toString
Appends a string representation of this LDAP control to the provided buffer.
-