|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.ldap.sdk.Control
com.unboundid.ldap.sdk.unboundidds.controls.AssuredReplicationRequestControl
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class AssuredReplicationRequestControl
NOTE: This class is part of the Commercial Edition of the UnboundID LDAP SDK for Java. It is not available for use in applications that include only the Standard Edition of the LDAP SDK, and is not supported for use in conjunction with non-UnboundID products.This class provides an implementation of an LDAP control that can be included in add, bind, modify, modify DN, and certain extended requests to indicate the level of replication assurance desired for the associated operation.
AssuredReplicationRequest ::= SEQUENCE { minimumLocalLevel [0] LocalLevel OPTIONAL, maximumLocalLevel [1] LocalLevel OPTIONAL, minimumRemoteLevel [2] RemoteLevel OPTIONAL, maximumRemoteLevel [3] RemoteLevel OPTIONAL, timeoutMillis [4] INTEGER (1 .. 2147483647) OPTIONAL, sendResponseImmediately [5] BOOLEAN DEFAULT FALSE, ... } LocalLevel ::= ENUMERATED { none (0), receivedAnyServer (1), processedAllServers (2), ... } RemoteLevel ::= ENUMERATED { none (0), receivedAnyRemoteLocation (1), receivedAllRemoteLocations (2), processedAllRemoteServers (3), ... }
DeleteRequest deleteRequest = new DeleteRequest( "uid=test.user,ou=People,dc=example,dc=com"); deleteRequest.addControl(new AssuredReplicationRequestControl( AssuredReplicationLocalLevel.PROCESSED_ALL_SERVERS, AssuredReplicationRemoteLevel.RECEIVED_ANY_REMOTE_LOCATION, 5000L)); LDAPResult deleteResult = connection.delete(deleteRequest); if (deleteResult.getResultCode() == ResultCode.SUCCESS) { AssuredReplicationResponseControl assuredReplicationResponse = AssuredReplicationResponseControl.get(deleteResult); if (assuredReplicationResponse == null) { // The entry was deleted, but its replication could not be confirmed in // either the local or remote data centers. } else { if (assuredReplicationResponse.localAssuranceSatisfied()) { if (assuredReplicationResponse.remoteAssuranceSatisfied()) { // The entry was deleted. The delete has been applied across all // available local servers, and has been replicated to at least one // remote data center. } else { // The entry was deleted. The delete has been applied across all // available local servers, but cannot be confirmed to have yet // been replicated to any remote data centers. } } else if (assuredReplicationResponse.remoteAssuranceSatisfied()) { // The entry was deleted. The delete has been confirmed to have been // replicated to at least one remote data center, but cannot be // confirmed to have yet been applied to all available local servers. } else { // The entry was deleted, but its replication could not be confirmed // to either local servers or remote data centers. } } } else { // The entry could not be deleted. }
AssuredReplicationResponseControl
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
ASSURED_REPLICATION_REQUEST_OID
The OID (1.3.6.1.4.1.30221.2.5.28) for the assured replication request control. |
Constructor Summary | |
---|---|
AssuredReplicationRequestControl(AssuredReplicationLocalLevel minimumLocalLevel,
AssuredReplicationRemoteLevel minimumRemoteLevel,
java.lang.Long timeoutMillis)
Creates a new assured replication request control with the provided information. |
|
AssuredReplicationRequestControl(boolean isCritical,
AssuredReplicationLocalLevel minimumLocalLevel,
AssuredReplicationLocalLevel maximumLocalLevel,
AssuredReplicationRemoteLevel minimumRemoteLevel,
AssuredReplicationRemoteLevel maximumRemoteLevel,
java.lang.Long timeoutMillis,
boolean sendResponseImmediately)
Creates a new assured replication request control with the provided information. |
|
AssuredReplicationRequestControl(Control c)
Creates a new assured replication request control from the provided generic control. |
Method Summary | |
---|---|
java.lang.String |
getControlName()
Retrieves the user-friendly name for this control, if available. |
AssuredReplicationLocalLevel |
getMaximumLocalLevel()
Retrieves the maximum desired replication level of assurance for local servers (i.e., servers in the same location as the server that originally received the change), if defined. |
AssuredReplicationRemoteLevel |
getMaximumRemoteLevel()
Retrieves the maximum desired replication level of assurance for remote servers (i.e., servers in locations different from the server that originally received the change), if defined. |
AssuredReplicationLocalLevel |
getMinimumLocalLevel()
Retrieves the minimum desired replication level of assurance for local servers (i.e., servers in the same location as the server that originally received the change), if defined. |
AssuredReplicationRemoteLevel |
getMinimumRemoteLevel()
Retrieves the minimum desired replication level of assurance for remote servers (i.e., servers in locations different from the server that originally received the change), if defined. |
java.lang.Long |
getTimeoutMillis()
Retrieves the maximum length of time in milliseconds that the operation response should be delayed while waiting for the desired level of assurance to be attained. |
boolean |
sendResponseImmediately()
Indicates whether the server that originally received the change should return the operation result immediately, without waiting for the requested assurance processing to complete. |
void |
toString(java.lang.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, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, toString, writeTo |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ASSURED_REPLICATION_REQUEST_OID
Constructor Detail |
---|
public AssuredReplicationRequestControl(AssuredReplicationLocalLevel minimumLocalLevel, AssuredReplicationRemoteLevel minimumRemoteLevel, java.lang.Long timeoutMillis)
minimumLocalLevel
- The minimum replication assurance level desired
for servers in the same location as the server
receiving the change. This may be overridden
by the server if the associated operation
matches an assured replication criteria with a
higher local assurance level. If this is
null
, then the server will determine
minimum local assurance level for the
operation.minimumRemoteLevel
- The minimum replication assurance level desired
for servers in different locations from the
server receiving the change. This may be
overridden by the server if the associated
operation matches an assured replication
criteria with a higher remote assurance level.
If this is null
, then the server will
determine the remote assurance level for the
operation.timeoutMillis
- The maximum length of time in milliseconds to
wait for the desired assurance to be satisfied.
If this is null
, then the server will
determine the timeout to use.public AssuredReplicationRequestControl(boolean isCritical, AssuredReplicationLocalLevel minimumLocalLevel, AssuredReplicationLocalLevel maximumLocalLevel, AssuredReplicationRemoteLevel minimumRemoteLevel, AssuredReplicationRemoteLevel maximumRemoteLevel, java.lang.Long timeoutMillis, boolean sendResponseImmediately)
isCritical
- Indicates whether the control should be
marked critical.minimumLocalLevel
- The minimum replication assurance level
desired for servers in the same location
as the server receiving the change. This
may be overridden by the server if the
associated operation matches an assured
replication criteria with a higher local
assurance level. If this is null
,
then the server will determine the minimum
local assurance level for the operation.maximumLocalLevel
- The maximum replication assurance level
desired for servers in the same location
as the server receiving the change. This
may override the server configuration if
the operation matches an assured
replication criteria that would have
otherwise used a higher local assurance
level. If this is null
, then the
server will determine the maximum local
assurance level for the operation.minimumRemoteLevel
- The minimum replication assurance level
desired for servers in different locations
from the server receiving the change.
This may be overridden by the server if
the associated operation matches an
assured replication criteria with a higher
remote assurance level. If this is
null
, then the server will
determine the minimum remote assurance
level for the operation.maximumRemoteLevel
- The maximum replication assurance level
desired for servers in different locations
from the server receiving the change.
This may override the server configuration
if the operation matches an assured
replication criteria that would have
otherwise used a higher remote assurance
level. If this is null
, then the
server will determine the maximum remote
assurance level for the operation.timeoutMillis
- The maximum length of time in milliseconds
to wait for the desired assurance to be
satisfied. If this is null
, then
the server will determine the timeout to
use.sendResponseImmediately
- Indicates whether the server should
send the response to the client immediately after the change
has been applied to the server receiving the change, without
waiting for the desired assurance to be satisfied.public AssuredReplicationRequestControl(Control c) throws LDAPException
c
- The generic control to decode as an assured replication request
control. It must not be null
.
LDAPException
- If the provided generic control cannot be parsed as
an assured replication request control.Method Detail |
---|
public AssuredReplicationLocalLevel getMinimumLocalLevel()
null
if the server should determine the
minimum local assurance level for the operation.public AssuredReplicationLocalLevel getMaximumLocalLevel()
null
if the server should determine the
maximum local assurance level for the operation.public AssuredReplicationRemoteLevel getMinimumRemoteLevel()
null
if the server should determine the
minimum remote assurance level for the operation.public AssuredReplicationRemoteLevel getMaximumRemoteLevel()
null
if the server should determine the
maximum remote assurance level for the operation.public boolean sendResponseImmediately()
false
if the server should wait to return the operation
result until the desired assurance has been attained or a timeout
has occurred, or true
if the server should return the
result immediately.public java.lang.Long getTimeoutMillis()
public java.lang.String getControlName()
getControlName
in class Control
public void toString(java.lang.StringBuilder buffer)
toString
in class Control
buffer
- The buffer to which to append the string representation of
this buffer.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |