org.jboss.cache.lock
Interface LockStrategy

All Known Implementing Classes:
LockStrategyNone, LockStrategyReadCommitted, LockStrategyReadUncommitted, LockStrategyRepeatableRead, LockStrategySerializable

public interface LockStrategy

Interface to specify lock strategy, e.g., for different isolation levels.

Author:
Ben Wang

Method Summary
 EDU.oswego.cs.dl.util.concurrent.Sync readLock()
          Return a read lock object.
 EDU.oswego.cs.dl.util.concurrent.Sync upgradeLockAttempt(long msecs)
          Attempt to upgrade the current read lock to write lock with msecs timeout.
 EDU.oswego.cs.dl.util.concurrent.Sync writeLock()
          Return a write lock object.
 

Method Detail

readLock

EDU.oswego.cs.dl.util.concurrent.Sync readLock()
Return a read lock object.

Returns:
Sync (@see EDU.oswego.cs.dl.util.concurrent.Sync)

writeLock

EDU.oswego.cs.dl.util.concurrent.Sync writeLock()
Return a write lock object.

Returns:
Sync (@see EDU.oswego.cs.dl.util.concurrent.Sync)

upgradeLockAttempt

EDU.oswego.cs.dl.util.concurrent.Sync upgradeLockAttempt(long msecs)
                                                         throws UpgradeException
Attempt to upgrade the current read lock to write lock with msecs timeout.

Parameters:
msecs - Timeout in milliseconds.
Returns:
Sync object. Will return null if timeout or failed.
Throws:
UpgradeException


Copyright 1998-2005 JBoss Inc . All Rights Reserved.