@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class AssuredReplicationRequestControl extends Control
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only
supported for use against Ping Identity, UnboundID, and
Nokia/Alcatel-Lucent 8661 server products. These classes provide support
for proprietary functionality or for external specifications that are not
considered stable or mature enough to be guaranteed to work in an
interoperable way with other types of LDAP servers.
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 FormModifier and Type | Field and Description |
---|---|
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
decode, decode, decodeControls, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, registerDecodeableControl, toString, writeTo
@NotNull public static final java.lang.String ASSURED_REPLICATION_REQUEST_OID
public AssuredReplicationRequestControl(@Nullable AssuredReplicationLocalLevel minimumLocalLevel, @Nullable AssuredReplicationRemoteLevel minimumRemoteLevel, @Nullable 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, @Nullable AssuredReplicationLocalLevel minimumLocalLevel, @Nullable AssuredReplicationLocalLevel maximumLocalLevel, @Nullable AssuredReplicationRemoteLevel minimumRemoteLevel, @Nullable AssuredReplicationRemoteLevel maximumRemoteLevel, @Nullable 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(@NotNull 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.@Nullable public AssuredReplicationLocalLevel getMinimumLocalLevel()
null
if the server should determine the
minimum local assurance level for the operation.@Nullable public AssuredReplicationLocalLevel getMaximumLocalLevel()
null
if the server should determine the
maximum local assurance level for the operation.@Nullable public AssuredReplicationRemoteLevel getMinimumRemoteLevel()
null
if the server should determine the
minimum remote assurance level for the operation.@Nullable 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.@Nullable public java.lang.Long getTimeoutMillis()
@NotNull public java.lang.String getControlName()
getControlName
in class Control