Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.cache.lock
Class LockStrategyRepeatableRead

    java.lang.Object
      org.jboss.cache.lock.LockStrategyRepeatableRead

All Implemented Interfaces:
  LockStrategy

public class LockStrategyRepeatableRead
extends Object
implements LockStrategy

Transaction isolation level of Repeatable_Read. It prevents dirty read and non-repeatable read.

Dirty read allows (t1) write and then (t2) read within two separate threads, all without transaction commit.

Non-repeatable allows read allows (t1) read, (t2) write, and then (t1) read, all without transaction commit.

Version:
  $Revision: 1.5 $
Author:
  Ben Wang

Constructor Summary
`LockStrategyRepeatableRead()`

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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LockStrategyRepeatableRead

    public LockStrategyRepeatableRead()

Method Detail

### readLock

    public EDU.oswego.cs.dl.util.concurrent.Sync readLock()

  Description copied from interface: `LockStrategy`
  Return a read lock object.

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

### upgradeLockAttempt

    public EDU.oswego.cs.dl.util.concurrent.Sync upgradeLockAttempt(long msecs)
                                                             throws UpgradeException

  Description copied from interface: `LockStrategy`
  Attempt to upgrade the current read lock to write lock with `msecs` timeout.

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

### writeLock

    public EDU.oswego.cs.dl.util.concurrent.Sync writeLock()

  Description copied from interface: `LockStrategy`
  Return a write lock object.

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.