Package org.apache.openjpa.jdbc.kernel
Interface JDBCLockManager
-
- All Superinterfaces:
Closeable
,LockLevels
,LockManager
- All Known Implementing Classes:
MixedLockManager
,PessimisticLockManager
public interface JDBCLockManager extends LockManager
Extension of theLockManager
interface with methods for datastore locking during the select and load process. Implementors of this interface can also take advantage of the fact that in theLockManager.lock(org.apache.openjpa.kernel.OpenJPAStateManager, int, int, java.lang.Object)
andLockManager.lockAll(java.util.Collection, int, int, java.lang.Object)
methods, the givenconn
parameter, if any, will be an instance ofConnectionInfo
.- Author:
- Abe White
-
-
Field Summary
-
Fields inherited from interface org.apache.openjpa.kernel.LockLevels
LOCK_NONE, LOCK_READ, LOCK_WRITE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
loadedForUpdate(OpenJPAStateManager sm)
Notification that the given instance was loaded via a result set produced by a FOR UPDATE select.boolean
selectForUpdate(Select sel, int lockLevel)
Return whether to issue the given select FOR UPDATE, depending on the capabilities of the dictionary and the fetch configuration.boolean
skipRelationFieldLock()
Return true if locking is not desired for relation fields.-
Methods inherited from interface org.apache.openjpa.kernel.LockManager
beginTransaction, close, endTransaction, getLockLevel, lock, lockAll, refreshLock, release, setContext
-
-
-
-
Method Detail
-
selectForUpdate
boolean selectForUpdate(Select sel, int lockLevel)
Return whether to issue the given select FOR UPDATE, depending on the capabilities of the dictionary and the fetch configuration.
-
loadedForUpdate
void loadedForUpdate(OpenJPAStateManager sm)
Notification that the given instance was loaded via a result set produced by a FOR UPDATE select.
-
skipRelationFieldLock
boolean skipRelationFieldLock()
Return true if locking is not desired for relation fields.
-
-