Class TransactionSettingsScopedLockDetails
- java.lang.Object
-
- com.unboundid.ldap.sdk.unboundidds.controls.TransactionSettingsScopedLockDetails
-
- All Implemented Interfaces:
java.io.Serializable
@Mutable @ThreadSafety(level=NOT_THREADSAFE) public final class TransactionSettingsScopedLockDetails extends java.lang.Object implements java.io.Serializable
This class provides a data structure that holds information that may be used if the server needs to acquire a scoped lock that may apply to a subset of related requests within a backend, without affecting other unrelated operations being processed in that backend.
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.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TransactionSettingsScopedLockDetails(java.lang.String scopeIdentifier, TransactionSettingsBackendLockBehavior lockBehavior)
Creates a new scoped lock details object with the provided information.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TransactionSettingsScopedLockDetails
decode(ASN1Element element)
Decodes the provided ASN.1 element as a set of scoped lock settings.ASN1Element
encode()
Encodes the scoped lock details into an ASN.1 element for inclusion in a transaction settings request control.TransactionSettingsBackendLockBehavior
getLockBehavior()
Retrieves the behavior that indicates when the lock should be acquired.java.lang.String
getScopeIdentifier()
Retrieves s string that identifies which scoped lock to acquire.java.lang.String
toString()
Retrieves a string representation of the scoped lock details.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of the scoped lock details to the provided buffer.
-
-
-
Constructor Detail
-
TransactionSettingsScopedLockDetails
public TransactionSettingsScopedLockDetails(@NotNull java.lang.String scopeIdentifier, @NotNull TransactionSettingsBackendLockBehavior lockBehavior)
Creates a new scoped lock details object with the provided information.- Parameters:
scopeIdentifier
- A string that identifies which scoped lock to acquire. It must not benull
.lockBehavior
- The behavior that indicates when the server should attempt to acquire the scoped lock. It must not benull
, and should not beDO_NOT_ACQUIRE
.
-
-
Method Detail
-
getScopeIdentifier
@NotNull public java.lang.String getScopeIdentifier()
Retrieves s string that identifies which scoped lock to acquire.- Returns:
- A string that identifies which scoped lock to acquire.
-
getLockBehavior
@NotNull public TransactionSettingsBackendLockBehavior getLockBehavior()
Retrieves the behavior that indicates when the lock should be acquired.- Returns:
- The behavior that indicates when the lock should be acquired.
-
encode
@Nullable public ASN1Element encode()
Encodes the scoped lock details into an ASN.1 element for inclusion in a transaction settings request control.- Returns:
- The ASN.1 element containing the encoded scoped lock details, or
null
if no scoped lock is needed (as indicated by a lock behavior ofDO_NOT_ACQUIRE
).
-
decode
@Nullable public static TransactionSettingsScopedLockDetails decode(@Nullable ASN1Element element) throws LDAPException
Decodes the provided ASN.1 element as a set of scoped lock settings.- Parameters:
element
- The ASN.1 element to decode as a set of scoped lock settings. It may benull
if the associated transaction settings request control did not include any scoped lock settings.- Returns:
- The decoded scoped lock settings.
- Throws:
LDAPException
- If a problem occurs while attempting to decode the provided ASN.1 element as a set of scoped lock settings.
-
toString
@NotNull public java.lang.String toString()
Retrieves a string representation of the scoped lock details.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the scoped lock details.
-
-