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
Modifier and TypeFieldDescriptionprotected StoreContext
The context against which this LockManager is operating.protected Log
Runtime log to write locking messages to.Fields inherited from interface org.apache.openjpa.kernel.LockLevels
LOCK_NONE, LOCK_READ, LOCK_WRITE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Does nothing by default.void
close()
Does nothing by default.void
Does nothing by default.void
lockAll
(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 collectionvoid
setContext
(StoreContext ctx) Set the context this lock manager is associated with.boolean
Default 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, wait
Methods 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:LockManager
Set the context this lock manager is associated with. This will be invoked in the lock manager before any other methods are called.- Specified by:
setContext
in interfaceLockManager
-
getContext
-
lockAll
Delegates toLockManager.lock(org.apache.openjpa.kernel.OpenJPAStateManager, int, int, java.lang.Object)
with each element of the collection- Specified by:
lockAll
in interfaceLockManager
- See Also:
-
beginTransaction
public void beginTransaction()Does nothing by default.- Specified by:
beginTransaction
in interfaceLockManager
-
endTransaction
public void endTransaction()Does nothing by default.- Specified by:
endTransaction
in interfaceLockManager
-
close
public void close()Does nothing by default.- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceLockManager
-
skipRelationFieldLock
public boolean skipRelationFieldLock()Default not to skip relation field to maintain PessimisticLockManager semantics.
-