|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openjpa.kernel.AbstractLockManager
org.apache.openjpa.kernel.NoneLockManager
public class NoneLockManager
A lock manager that does not perform any locking.
Field Summary |
---|
Fields inherited from class org.apache.openjpa.kernel.AbstractLockManager |
---|
ctx, log |
Fields inherited from interface org.apache.openjpa.kernel.LockLevels |
---|
LOCK_NONE, LOCK_READ, LOCK_WRITE |
Constructor Summary | |
---|---|
NoneLockManager()
|
Method Summary | |
---|---|
int |
getLockLevel(OpenJPAStateManager sm)
Return the lock level of the specified instance, or LockLevels.LOCK_NONE if not locked. |
void |
lock(OpenJPAStateManager sm,
int level,
int timeout,
java.lang.Object context)
Obtain a lock on the specified object. |
void |
release(OpenJPAStateManager sm)
Release the lock on the given object. |
Methods inherited from class org.apache.openjpa.kernel.AbstractLockManager |
---|
beginTransaction, close, endTransaction, getContext, lockAll, setContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NoneLockManager()
Method Detail |
---|
public void lock(OpenJPAStateManager sm, int level, int timeout, java.lang.Object context)
LockManager
sm
- the object to locklevel
- one of the lock constants defined in LockLevels
,
or a custom leveltimeout
- the timeout in milliseconds, or a negative number for
no timeoutcontext
- the context information passed from the store manager
to the persistence context, if any; lock managers
specific to a certain back end may be able to take
advantage of this; others should ignore itOpenJPAStateManager.setLock(java.lang.Object)
public void release(OpenJPAStateManager sm)
LockManager
LockManager.endTransaction()
.
The lock manager should null the state manager's lock object. Note
that some state manager may be garbage collected during a transaction;
thus lock managers cannot rely on this method being called for every
state manager.
OpenJPAStateManager.setLock(java.lang.Object)
public int getLockLevel(OpenJPAStateManager sm)
LockManager
LockLevels.LOCK_NONE
if not locked.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |