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.apache.openjpa.slice
Class ReentrantSliceLock

    java.lang.Object
      java.util.concurrent.locks.ReentrantLock
          org.apache.openjpa.slice.ReentrantSliceLock

All Implemented Interfaces:
  Serializable, Lock

    public class ReentrantSliceLock

extends ReentrantLock

A reentrant lock that lets a child to work with the parent's lock.

Author:
  Pinaki Poddar
See Also:
  Serialized Form

Constructor Summary
`ReentrantSliceLock()`
`ReentrantSliceLock(boolean fair)`

Method Summary
`void` | `lock()` Locks only for parent thread and let the child use parent's lock.
`void` | `unlock()` Unlocks only if parent thread.

Methods inherited from class java.util.concurrent.locks.ReentrantLock
`getHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked, lockInterruptibly, newCondition, toString, tryLock, tryLock`

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

Constructor Detail

### ReentrantSliceLock

    public ReentrantSliceLock()

### ReentrantSliceLock

    public ReentrantSliceLock(boolean fair)

Method Detail

### lock

    public void lock()

  Locks only for parent thread and let the child use parent's lock.

  Specified by:
    `lock` in interface `Lock`
  Overrides:
    `lock` in class `ReentrantLock`

### unlock

    public void unlock()

  Unlocks only if parent thread.

  Specified by:
    `unlock` in interface `Lock`
  Overrides:
    `unlock` in class `ReentrantLock`

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 © 2006-2013 Apache Software Foundation. All Rights Reserved.