当前页面:
在线文档首页 >
JBoss 3.2.7 Cache API Documentation 英文版文档
LockManagerImpl (JBoss Cache API) - JBoss 3.2.7 Cache API Documentation 英文版文档
org.jboss.cache.lock
Class LockManagerImpl
java.lang.Object
org.jboss.cache.lock.LockManagerImpl
- All Implemented Interfaces:
- LockManager
- public class LockManagerImpl
- extends Object
- implements LockManager
- Version:
- $Revision: 1.1.2.6 $
- Author:
- Bela Ban Apr 10, 2003
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dirty_reads_allowed
protected boolean dirty_reads_allowed
LockManagerImpl
public LockManagerImpl()
getDirtyReadsAllowed
public boolean getDirtyReadsAllowed()
- Description copied from interface:
LockManager
- Can we read values changed in another (uncommitted) transaction ?
If true we can have read-locks; otherwise only write-locks will be acquired
- Specified by:
getDirtyReadsAllowed
in interface LockManager
setDirtyReadsAllowed
public void setDirtyReadsAllowed(boolean flag)
- Specified by:
setDirtyReadsAllowed
in interface LockManager
getReadLock
public void getReadLock(TreeCache cache,
String fqn,
long timeout)
throws TimeoutException
- Description copied from interface:
LockManager
- Acquires a read lock. If the lock cannot be acquired within the timeout,
a TimeoutExeption will be thrown. If the current thread already owns the read-lock,
or owns the write-lock, this will succeed.
- Specified by:
getReadLock
in interface LockManager
- Parameters:
cache
- fqn
- timeout
-
- Throws:
TimeoutException
getWriteLock
public void getWriteLock(TreeCache cache,
String fqn,
long timeout)
throws TimeoutException,
UpgradeException
- Description copied from interface:
LockManager
- Acquires a write-lock. If the lock cannot be acquired within the timeout,
a TimeoutExeption will be thrown. If the current thread already owns the write-lock,
this will succeed. If the current thread own the read-lock, it will try to upgrade
the read-lock to write-lock status. If this fails, an UpgradeException will be thrown.
- Specified by:
getWriteLock
in interface LockManager
- Parameters:
cache
- fqn
- timeout
-
- Throws:
TimeoutException
UpgradeException
releaseLock
public void releaseLock(String fqn,
boolean release_children)
- Specified by:
releaseLock
in interface LockManager
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.