com.unboundid.ldap.sdk.unboundidds.controls
Enum TransactionSettingsBackendLockBehavior

java.lang.Object
  extended by java.lang.Enum<TransactionSettingsBackendLockBehavior>
      extended by 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>

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 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.

See Also:
TransactionSettingsRequestControl

Enum Constant Summary
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
 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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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 name
java.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.