|
||||||||||
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.VersionLockManager
org.apache.openjpa.jdbc.kernel.PessimisticLockManager
public class PessimisticLockManager
Lock manager that uses exclusive database locks.
Field Summary | |
---|---|
static int |
LOCK_DATASTORE_ONLY
|
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 | |
---|---|
PessimisticLockManager()
|
Method Summary | |
---|---|
protected void |
checkLock(ResultSet rs,
OpenJPAStateManager sm)
This method is to provide override for non-JDBC or JDBC-like implementation of checking lock from the result set. |
protected ResultSet |
executeQuery(Connection conn,
PreparedStatement stmnt,
SQLBuffer sql)
This method is to provide override for non-JDBC or JDBC-like implementation of executing query. |
JDBCStore |
getStore()
|
void |
loadedForUpdate(OpenJPAStateManager sm)
Notification that the given instance was loaded via a result set produced by a FOR UPDATE select. |
protected void |
lockInternal(OpenJPAStateManager sm,
int level,
int timeout,
Object sdata)
Marks the instance's transactional status in accordance with the settings of VersionLockManager.getVersionCheckOnReadLock()
and VersionLockManager.getVersionUpdateOnWriteLock() . |
protected PreparedStatement |
prepareStatement(Connection conn,
SQLBuffer sql)
This method is to provide override for non-JDBC or JDBC-like implementation of preparing statement. |
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. |
void |
setContext(StoreContext ctx)
Set the context this lock manager is associated with. |
protected void |
setTimeout(PreparedStatement stmnt,
int timeout)
This method is to provide override for non-JDBC or JDBC-like implementation of setting query timeout. |
Methods inherited from class org.apache.openjpa.kernel.VersionLockManager |
---|
getLockLevel, getVersionCheckOnReadLock, getVersionUpdateOnWriteLock, lock, release, setLockLevel, setVersionCheckOnReadLock, setVersionUpdateOnWriteLock |
Methods inherited from class org.apache.openjpa.kernel.AbstractLockManager |
---|
beginTransaction, close, endTransaction, getContext, lockAll |
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 |
---|
beginTransaction, close, endTransaction, getLockLevel, lock, lockAll, release |
Field Detail |
---|
public static final int LOCK_DATASTORE_ONLY
Constructor Detail |
---|
public PessimisticLockManager()
Method Detail |
---|
public void setContext(StoreContext ctx)
LockManager
setContext
in interface LockManager
setContext
in class AbstractLockManager
public boolean selectForUpdate(Select sel, int lockLevel)
JDBCLockManager
selectForUpdate
in interface JDBCLockManager
public void loadedForUpdate(OpenJPAStateManager sm)
JDBCLockManager
loadedForUpdate
in interface JDBCLockManager
protected void lockInternal(OpenJPAStateManager sm, int level, int timeout, Object sdata)
VersionLockManager
VersionLockManager.getVersionCheckOnReadLock()
and VersionLockManager.getVersionUpdateOnWriteLock()
. Override to perform
additional locking.
lockInternal
in class VersionLockManager
StoreContext.transactional(java.lang.Object, boolean, org.apache.openjpa.kernel.OpCallbacks)
public JDBCStore getStore()
protected PreparedStatement prepareStatement(Connection conn, SQLBuffer sql) throws SQLException
SQLException
protected void setTimeout(PreparedStatement stmnt, int timeout) throws SQLException
SQLException
protected ResultSet executeQuery(Connection conn, PreparedStatement stmnt, SQLBuffer sql) throws SQLException
SQLException
protected void checkLock(ResultSet rs, OpenJPAStateManager sm) throws SQLException
SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This documentation is deprecated and will be removed in the next release of WebLogic Server.