站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 Cache API Documentation 英文版文档

LockStrategy (JBossCache API) - JBoss 4.0.1 sp1 Cache API Documentation 英文版文档


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

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

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

writeLock

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

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

upgradeLockAttempt

public 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 © 2002 JBoss Group, LLC. All Rights Reserved.