org.apache.commons.transaction.locking
Enum LockException.Code

java.lang.Object
  extended by java.lang.Enum<LockException.Code>
      extended by org.apache.commons.transaction.locking.LockException.Code
All Implemented Interfaces:
Serializable, Comparable<LockException.Code>
Enclosing class:
LockException

public static enum LockException.Code
extends Enum<LockException.Code>


Enum Constant Summary
COMMIT_FAILED
          A commit was tried, but did not succeed.
CONFLICT
          A conflict between two optimistic transactions occurred.
INTERRUPTED
          Thread has been interrupted while waiting for lock.
TIMED_OUT
          Maximum wait time for a lock has been exceeded.
WOULD_DEADLOCK
          Locking request canceled because of deadlock.
 
Method Summary
static LockException.Code valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LockException.Code[] 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

INTERRUPTED

public static final LockException.Code INTERRUPTED
Thread has been interrupted while waiting for lock.


TIMED_OUT

public static final LockException.Code TIMED_OUT
Maximum wait time for a lock has been exceeded.


WOULD_DEADLOCK

public static final LockException.Code WOULD_DEADLOCK
Locking request canceled because of deadlock.


CONFLICT

public static final LockException.Code CONFLICT
A conflict between two optimistic transactions occurred.


COMMIT_FAILED

public static final LockException.Code COMMIT_FAILED
A commit was tried, but did not succeed.

Method Detail

values

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

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

valueOf

public static LockException.Code valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2004-2007 The Apache Software Foundation. All Rights Reserved.