public class LockException
extends java.lang.RuntimeException
| Modifier and Type | Field and Description |
|---|---|
protected int |
code |
static int |
CODE_DEADLOCK_VICTIM
Locking request canceled because of deadlock.
|
static int |
CODE_INTERRUPTED
Thread has been interrupted while waiting for lock.
|
static int |
CODE_TIMED_OUT
Maximum wait time for a lock has been exceeded.
|
protected java.lang.String |
reason |
protected java.lang.Object |
resourceId |
| Constructor and Description |
|---|
LockException(java.lang.String reason,
int code,
java.lang.Object resourceId) |
| Modifier and Type | Method and Description |
|---|---|
int |
getCode()
Returns the formal reason for the exception.
|
java.lang.String |
getReason()
Returns the verbose for the exception.
|
java.lang.Object |
getResourceId()
Returns the resource the lock was tried on.
|
public static final int CODE_INTERRUPTED
public static final int CODE_TIMED_OUT
public static final int CODE_DEADLOCK_VICTIM
protected java.lang.Object resourceId
protected java.lang.String reason
protected int code
public LockException(java.lang.String reason,
int code,
java.lang.Object resourceId)
public int getCode()
CODE_INTERRUPTED,CODE_TIMED_OUTor
CODE_DEADLOCK_VICTIM.public java.lang.Object getResourceId()
null if not applicablepublic java.lang.String getReason()
Copyright ? 2004 The Apache Software Foundation. All Rights Reserved.