|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ojb.broker.locking.LockManagerRemoteImpl
This implementation of the LockManager interface supports locking
in distributed environments in combination with a specific lock servlet.
LockManagerServlet| Nested Class Summary | |
static class |
LockManagerRemoteImpl.LockInfo
|
| Field Summary | |
static byte |
METHOD_BLOCK_TIMEOUT
|
static byte |
METHOD_BLOCK_TIMEOUT_SET
|
static byte |
METHOD_CHECK_READ
|
static byte |
METHOD_CHECK_UPGRADE
|
static byte |
METHOD_CHECK_WRITE
|
static byte |
METHOD_LOCK_INFO
|
static byte |
METHOD_LOCK_TIMEOUT
|
static byte |
METHOD_LOCK_TIMEOUT_SET
|
static byte |
METHOD_READ_LOCK
|
static byte |
METHOD_RELEASE_LOCKS
|
static byte |
METHOD_RELEASE_SINGLE_LOCK
|
static byte |
METHOD_UPGRADE_LOCK
|
static byte |
METHOD_WRITE_LOCK
|
| Fields inherited from interface org.apache.ojb.broker.locking.LockManager |
DEFAULT_BLOCK_TIMEOUT, DEFAULT_LOCK_TIMEOUT |
| Fields inherited from interface org.apache.ojb.broker.locking.IsolationLevels |
IL_DEFAULT, IL_NONE, IL_OPTIMISTIC, IL_READ_COMMITTED, IL_READ_UNCOMMITTED, IL_REPEATABLE_READ, IL_SERIALIZABLE, LITERAL_IL_NONE, LITERAL_IL_OPTIMISTIC, LITERAL_IL_READ_COMMITTED, LITERAL_IL_READ_UNCOMMITTED, LITERAL_IL_REPEATABLE_READ, LITERAL_IL_SERIALIZABLE |
| Constructor Summary | |
LockManagerRemoteImpl()
|
|
| Method Summary | |
void |
configure(org.apache.ojb.broker.util.configuration.Configuration pConfig)
|
long |
getBlockTimeout()
The maximal time to wait for acquire a lock. |
java.lang.String |
getLockInfo()
Returns info about the used lock manager implementation and the state of the lock manager. |
long |
getLockTimeout()
Get the current used lock timeout value in milliseconds. |
boolean |
hasRead(java.lang.Object key,
java.lang.Object resourceId)
Checks if there is a read lock for owner key on resource object. |
boolean |
hasUpgrade(java.lang.Object key,
java.lang.Object resourceId)
Checks if there is a upgrade lock for lock key on resource object. |
boolean |
hasWrite(java.lang.Object key,
java.lang.Object resourceId)
Checks if there is a write lock for lock key on resource object. |
boolean |
readLock(java.lang.Object key,
java.lang.Object resourceId,
int isolationLevel)
Acquires a readlock for lock key on resource object. |
boolean |
releaseLock(java.lang.Object key,
java.lang.Object resourceId)
Releases a lock for lock key on resource object. |
void |
releaseLocks(java.lang.Object key)
Release all resource locks hold by the specified owner key. |
byte[] |
serialize(java.lang.Object obj)
|
void |
setBlockTimeout(long timeout)
noop |
void |
setLockTimeout(long timeout)
noop |
boolean |
upgradeLock(java.lang.Object key,
java.lang.Object resourceId,
int isolationLevel)
Acquire an upgrade lock. |
boolean |
writeLock(java.lang.Object key,
java.lang.Object resourceId,
int isolationLevel)
Acquires a write lock for lock key on resource object. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final byte METHOD_READ_LOCK
public static final byte METHOD_WRITE_LOCK
public static final byte METHOD_UPGRADE_LOCK
public static final byte METHOD_CHECK_READ
public static final byte METHOD_CHECK_WRITE
public static final byte METHOD_CHECK_UPGRADE
public static final byte METHOD_RELEASE_SINGLE_LOCK
public static final byte METHOD_RELEASE_LOCKS
public static final byte METHOD_LOCK_INFO
public static final byte METHOD_LOCK_TIMEOUT
public static final byte METHOD_LOCK_TIMEOUT_SET
public static final byte METHOD_BLOCK_TIMEOUT
public static final byte METHOD_BLOCK_TIMEOUT_SET
| Constructor Detail |
public LockManagerRemoteImpl()
| Method Detail |
public void configure(org.apache.ojb.broker.util.configuration.Configuration pConfig)
throws org.apache.ojb.broker.util.configuration.ConfigurationException
configure in interface org.apache.ojb.broker.util.configuration.Configurableorg.apache.ojb.broker.util.configuration.ConfigurationExceptionConfigurable.configure(org.apache.ojb.broker.util.configuration.Configuration)public void setLockTimeout(long timeout)
setLockTimeout in interface LockManagertimeout - public long getLockTimeout()
LockManager
getLockTimeout in interface LockManagerpublic long getBlockTimeout()
LockManager
getBlockTimeout in interface LockManagerpublic void setBlockTimeout(long timeout)
setBlockTimeout in interface LockManagertimeout - The time to wait for acquire a lock.public java.lang.String getLockInfo()
LockManager
getLockInfo in interface LockManager
public boolean readLock(java.lang.Object key,
java.lang.Object resourceId,
int isolationLevel)
LockManager
readLock in interface LockManagerkey - The owner key of the lock.resourceId - The resource to lock.isolationLevel - The isolation level of the lock.
public boolean releaseLock(java.lang.Object key,
java.lang.Object resourceId)
LockManager
releaseLock in interface LockManagerkey - The owner key of the lock.resourceId - The resource to release.
public void releaseLocks(java.lang.Object key)
LockManager
releaseLocks in interface LockManagerkey - The owner key to release all associated locks.
public boolean writeLock(java.lang.Object key,
java.lang.Object resourceId,
int isolationLevel)
LockManager
writeLock in interface LockManagerkey - The owner key of the lock.resourceId - The resource to lock.isolationLevel - The isolation level of the lock.
public boolean upgradeLock(java.lang.Object key,
java.lang.Object resourceId,
int isolationLevel)
LockManager
upgradeLock in interface LockManagerkey - The owner key of the lock.resourceId - The resource to lock.isolationLevel - The isolation level of the lock.
public boolean hasRead(java.lang.Object key,
java.lang.Object resourceId)
LockManager
hasRead in interface LockManagerkey - The owner key of the lock.resourceId - The resource to check.
public boolean hasWrite(java.lang.Object key,
java.lang.Object resourceId)
LockManager
hasWrite in interface LockManagerkey - The owner key of the lock.resourceId - The resource to check.
public boolean hasUpgrade(java.lang.Object key,
java.lang.Object resourceId)
LockManager
hasUpgrade in interface LockManagerkey - The owner key of the lock.resourceId - The resource to check.
public byte[] serialize(java.lang.Object obj)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||