public class LockException extends 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 String |
reason |
protected Object |
resourceId |
Constructor and Description |
---|
LockException(String reason,
int code,
Object resourceId) |
Modifier and Type | Method and Description |
---|---|
int |
getCode()
Returns the formal reason for the exception.
|
String |
getReason()
Returns the verbose for the exception.
|
Object |
getResourceId()
Returns the resource the lock was tried on.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final int CODE_INTERRUPTED
public static final int CODE_TIMED_OUT
public static final int CODE_DEADLOCK_VICTIM
protected Object resourceId
protected int code
public LockException(String reason, int code, Object resourceId)
public int getCode()
CODE_INTERRUPTED
,CODE_TIMED_OUT
or
CODE_DEADLOCK_VICTIM
.public Object getResourceId()
null
if not applicableCopyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.