Enum TransactionSettingsBackendLockBehavior
- java.lang.Object
-
- java.lang.Enum<TransactionSettingsBackendLockBehavior>
-
- com.unboundid.ldap.sdk.unboundidds.controls.TransactionSettingsBackendLockBehavior
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TransactionSettingsBackendLockBehavior>
@ThreadSafety(level=COMPLETELY_THREADSAFE) public enum TransactionSettingsBackendLockBehavior extends java.lang.Enum<TransactionSettingsBackendLockBehavior>
This enum defines the options that may be specified to indicate whether and when to acquire an exclusive lock in the target backend when processing a transaction.
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:
TransactionSettingsRequestControl
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACQUIRE_AFTER_RETRIES
Indicates that if the server is unable to successfully commit the associated transaction after one or more attempts without holding an exclusive lock in the target backend, then it should make one more attempt after acquiring the lock.ACQUIRE_BEFORE_INITIAL_ATTEMPT
Indicates that the server should acquire an exclusive lock in the target backend before performing any backend processing for the operation.ACQUIRE_BEFORE_RETRIES
Indicates that if the server is unable to successfully commit the associated transaction after the first attempt without holding an exclusive lock in the target backend, then it should make one or more additional attempts (as specified by the requested number of retries) after acquiring the lock.DO_NOT_ACQUIRE
Indicates that the server should not make any attempt to acquire an exclusive lock in the target backend, whether during the initial attempt or a subsequent retry.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TransactionSettingsBackendLockBehavior
forName(java.lang.String name)
Retrieves the transaction settings backend lock behavior with the specified name.int
intValue()
Retrieves the integer value for this transaction settings backend lock behavior value.static TransactionSettingsBackendLockBehavior
valueOf(int intValue)
Retrieves the backend lock behavior value with the specified integer value.static TransactionSettingsBackendLockBehavior
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TransactionSettingsBackendLockBehavior[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DO_NOT_ACQUIRE
public static final TransactionSettingsBackendLockBehavior DO_NOT_ACQUIRE
Indicates that the server should not make any attempt to acquire an exclusive lock in the target backend, whether during the initial attempt or a subsequent retry. This will allow the highest level of concurrency for operations within the backend, but may increase the risk of lock conflicts between transactions in a server processing many operations concurrently. This risk may be mitigated by indicating that the transaction should be retried one or more times.
-
ACQUIRE_AFTER_RETRIES
public static final TransactionSettingsBackendLockBehavior ACQUIRE_AFTER_RETRIES
Indicates that if the server is unable to successfully commit the associated transaction after one or more attempts without holding an exclusive lock in the target backend, then it should make one more attempt after acquiring the lock. This will avoid the need to acquire the lock unless the maximum number of attempts have been unsuccessful without it.
-
ACQUIRE_BEFORE_RETRIES
public static final TransactionSettingsBackendLockBehavior ACQUIRE_BEFORE_RETRIES
Indicates that if the server is unable to successfully commit the associated transaction after the first attempt without holding an exclusive lock in the target backend, then it should make one or more additional attempts (as specified by the requested number of retries) after acquiring the lock. This will avoid the need to acquire the lock for operations that can be completed on the first attempt without it.
-
ACQUIRE_BEFORE_INITIAL_ATTEMPT
public static final TransactionSettingsBackendLockBehavior ACQUIRE_BEFORE_INITIAL_ATTEMPT
Indicates that the server should acquire an exclusive lock in the target backend before performing any backend processing for the operation. This will limit concurrency, as the backend will not be able to process any other operation while the associated operation is in progress, but this will also minimize the chance of a thread deadlock or lock timeout as a result of a conflict between database interactions from multiple simultaneous operations.
-
-
Method Detail
-
values
public static TransactionSettingsBackendLockBehavior[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TransactionSettingsBackendLockBehavior c : TransactionSettingsBackendLockBehavior.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TransactionSettingsBackendLockBehavior valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
intValue
public int intValue()
Retrieves the integer value for this transaction settings backend lock behavior value.- Returns:
- The integer value for this transaction settings backend lock behavior value.
-
valueOf
public static TransactionSettingsBackendLockBehavior valueOf(int intValue)
Retrieves the backend lock behavior value with the specified integer value.- Parameters:
intValue
- The integer value for the backend lock behavior to retrieve.- Returns:
- The backend lock behavior value with the specified integer value,
or
null
if there is no such backend lock behavior value.
-
forName
public static TransactionSettingsBackendLockBehavior forName(java.lang.String name)
Retrieves the transaction settings backend lock behavior with the specified name.- Parameters:
name
- The name of the transaction settings backend lock behavior to retrieve. It must not benull
.- Returns:
- The requested transaction settings backend lock behavior, or
null
if no such behavior is defined.
-
-