org.jboss.cache.lock
Class LockStrategyReadUncommitted

java.lang.Object
  extended byorg.jboss.cache.lock.LockStrategyReadUncommitted
All Implemented Interfaces:
LockStrategy (src)

public class LockStrategyReadUncommitted
extends java.lang.Object
implements LockStrategy (src)

Transaction isolation level of READ-UNCOMMITTED. Reads always succeed (NullLock), whereas writes are exclusive. It prevents none of the dirty read, non-repeatable read, or phantom read.


Constructor Summary
LockStrategyReadUncommitted()
           
 
Method Summary
 Sync readLock()
          Return a read lock object.
 Sync upgradeLockAttempt(long msecs)
          Attempt to upgrade the current read lock to write lock with msecs timeout.
 Sync writeLock()
          Return a write lock object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockStrategyReadUncommitted

public LockStrategyReadUncommitted()
Method Detail

readLock

public Sync readLock()
Description copied from interface: LockStrategy (src)
Return a read lock object.

Specified by:
readLock in interface LockStrategy (src)
Returns:
Sync (@see EDU.oswego.cs.dl.util.concurrent.Sync)
See Also:
LockStrategy.readLock()

upgradeLockAttempt

public Sync upgradeLockAttempt(long msecs)
                        throws UpgradeException (src) 
Description copied from interface: LockStrategy (src)
Attempt to upgrade the current read lock to write lock with msecs timeout.

Specified by:
upgradeLockAttempt in interface LockStrategy (src)
Parameters:
msecs - Timeout in milliseconds.
Returns:
Sync object. Will return null if timeout or failed.
Throws:
UpgradeException (src)
See Also:
LockStrategy.upgradeLockAttempt(long)

writeLock

public Sync writeLock()
Description copied from interface: LockStrategy (src)
Return a write lock object.

Specified by:
writeLock in interface LockStrategy (src)
Returns:
Sync (@see EDU.oswego.cs.dl.util.concurrent.Sync)
See Also:
LockStrategy.writeLock()