public class NoneLockManager extends AbstractLockManager
ctx, log
LOCK_NONE, LOCK_READ, LOCK_WRITE
Constructor and Description |
---|
NoneLockManager() |
Modifier and Type | Method and Description |
---|---|
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,
Object context)
Obtain a lock on the specified object.
|
void |
refreshLock(OpenJPAStateManager sm,
int level,
int timeout,
Object context)
Perform the same function as previous lock method and has the option
to perform a version check after the lock function has completed.
|
void |
release(OpenJPAStateManager sm)
Release the lock on the given object.
|
beginTransaction, close, endTransaction, getContext, lockAll, setContext, skipRelationFieldLock
public void lock(OpenJPAStateManager sm, int level, int timeout, 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 refreshLock(OpenJPAStateManager sm, int level, int timeout, Object context)
LockManager
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.public int getLockLevel(OpenJPAStateManager sm)
LockManager
LockLevels.LOCK_NONE
if not locked.Copyright © 2006–2017 Apache Software Foundation. All rights reserved.