org.opends.server.types
Enum LockType

java.lang.Object
  extended by java.lang.Enum<LockType>
      extended by org.opends.server.types.LockType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<LockType>

@PublicAPI(stability=UNCOMMITTED,
           mayInstantiate=false,
           mayExtend=false,
           mayInvoke=true)
public enum LockType
extends java.lang.Enum<LockType>

This enumeration defines a set of lock types that can be used when requesting that a lock be obtained for an entry or some other object.


Enum Constant Summary
NONE
          The lock type that indicates that no lock should be obtained for the associated object.
READ
          The lock type that indicates that a read lock should be obtained for the associated object.
WRITE
          The lock type that indicates that a write lock should be obtained for the associated object.
 
Method Summary
 java.lang.String getName()
          Retrieves the name of this lock type element.
 java.lang.String toString()
          Retrieves a string representation of this lock type element.
static LockType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static LockType[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

READ

public static final LockType READ
The lock type that indicates that a read lock should be obtained for the associated object.


WRITE

public static final LockType WRITE
The lock type that indicates that a write lock should be obtained for the associated object.


NONE

public static final LockType NONE
The lock type that indicates that no lock should be obtained for the associated object.

Method Detail

values

public static LockType[] 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 (LockType c : LockType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static LockType 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

getName

public java.lang.String getName()
Retrieves the name of this lock type element.

Returns:
The name of this lock type element.

toString

public java.lang.String toString()
Retrieves a string representation of this lock type element.

Overrides:
toString in class java.lang.Enum<LockType>
Returns:
A string representation of this lock type element.