|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LockManager
Interface defining a manager for locking of objects. There are currently two modes to a LockManager.
| Field Summary | |
|---|---|
static short |
LOCK_MODE_NONE
Lock mode representing no locking. |
static short |
LOCK_MODE_OPTIMISTIC_READ
Lock mode for optimistic reads. |
static short |
LOCK_MODE_OPTIMISTIC_WRITE
Lock mode for optimistic writes. |
static short |
LOCK_MODE_PESSIMISTIC_READ
Lock mode for pessimistic reads. |
static short |
LOCK_MODE_PESSIMISTIC_WRITE
Lock mode for pessimistic writes. |
| Method Summary | |
|---|---|
void |
clear()
Method to clear all settings of required lock level for object ids (mode 2). |
void |
close()
Method to close the manager and release resources. |
short |
getLockMode(java.lang.Object id)
Accessor for what locking should be applied to the object with the specified identity (mode 2). |
short |
getLockMode(StateManager sm)
Accessor for the current lock mode for the object managed by the passed StateManager (mode 1). |
void |
lock(java.lang.Object id,
short lockMode)
Method to lock the object with the provided identity (mode 2). |
void |
lock(StateManager sm,
short lockMode)
Method to lock the object managed by the passed StateManager (mode 1). |
void |
unlock(StateManager sm)
Method to unlock the object managed by the passed StateManager (mode 1). |
| Field Detail |
|---|
static final short LOCK_MODE_NONE
static final short LOCK_MODE_OPTIMISTIC_READ
static final short LOCK_MODE_OPTIMISTIC_WRITE
static final short LOCK_MODE_PESSIMISTIC_READ
static final short LOCK_MODE_PESSIMISTIC_WRITE
| Method Detail |
|---|
void lock(java.lang.Object id,
short lockMode)
id - Identity of the objectlockMode - mode for lockingshort getLockMode(java.lang.Object id)
id - The identity
void clear()
void lock(StateManager sm,
short lockMode)
sm - StateManager for the objectlockMode - mode for lockingvoid unlock(StateManager sm)
sm - StateManager for the objectshort getLockMode(StateManager sm)
sm - StateManager for the object
void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||