Package org.apache.openjpa.kernel
Class AbstractLockManager
java.lang.Object
org.apache.openjpa.kernel.AbstractLockManager
- All Implemented Interfaces:
LockLevels,LockManager,Closeable
- Direct Known Subclasses:
NoneLockManager,VersionLockManager
Abstract
LockManager implementation.- Author:
- Marc Prud'hommeaux
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StoreContextThe context against which this LockManager is operating.protected LogRuntime log to write locking messages to.Fields inherited from interface org.apache.openjpa.kernel.LockLevels
LOCK_NONE, LOCK_READ, LOCK_WRITE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDoes nothing by default.voidclose()Does nothing by default.voidDoes nothing by default.voidlockAll(Collection sms, int level, int timeout, Object context) Delegates toLockManager.lock(org.apache.openjpa.kernel.OpenJPAStateManager, int, int, java.lang.Object)with each element of the collectionvoidsetContext(StoreContext ctx) Set the context this lock manager is associated with.booleanDefault not to skip relation field to maintain PessimisticLockManager semantics.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.openjpa.kernel.LockManager
getLockLevel, lock, refreshLock, release
-
Field Details
-
ctx
The context against which this LockManager is operating. -
log
Runtime log to write locking messages to.
-
-
Constructor Details
-
AbstractLockManager
public AbstractLockManager()
-
-
Method Details
-
setContext
Description copied from interface:LockManagerSet the context this lock manager is associated with. This will be invoked in the lock manager before any other methods are called.- Specified by:
setContextin interfaceLockManager
-
getContext
-
lockAll
Delegates toLockManager.lock(org.apache.openjpa.kernel.OpenJPAStateManager, int, int, java.lang.Object)with each element of the collection- Specified by:
lockAllin interfaceLockManager- See Also:
-
beginTransaction
public void beginTransaction()Does nothing by default.- Specified by:
beginTransactionin interfaceLockManager
-
endTransaction
public void endTransaction()Does nothing by default.- Specified by:
endTransactionin interfaceLockManager
-
close
public void close()Does nothing by default.- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceLockManager
-
skipRelationFieldLock
public boolean skipRelationFieldLock()Default not to skip relation field to maintain PessimisticLockManager semantics.
-