ModeShape Distribution 3.0.0.Beta4

org.modeshape.jcr.value.binary
Class FileLocks.WrappedLock

java.lang.Object
  extended by org.modeshape.jcr.value.binary.FileLocks.WrappedLock
All Implemented Interfaces:
Lock
Enclosing class:
FileLocks

protected static class FileLocks.WrappedLock
extends Object
implements Lock


Field Summary
protected  Lock actualLock
           
protected  FileLocks.LockHolder holder
           
 
Constructor Summary
protected FileLocks.WrappedLock(FileLocks.LockHolder namedLock, Lock lock)
           
 
Method Summary
 void lock()
           
 FileChannel lockedFileChannel()
          Returns the FileLock.channel() associated with the file lock.
 void lockInterruptibly()
           
 Condition newCondition()
           
 boolean tryLock()
           
 boolean tryLock(long time, TimeUnit unit)
           
 void unlock()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

holder

protected final FileLocks.LockHolder holder

actualLock

protected final Lock actualLock
Constructor Detail

FileLocks.WrappedLock

protected FileLocks.WrappedLock(FileLocks.LockHolder namedLock,
                                Lock lock)
Method Detail

lock

public void lock()
Specified by:
lock in interface Lock

lockInterruptibly

public void lockInterruptibly()
Specified by:
lockInterruptibly in interface Lock

newCondition

public Condition newCondition()
Specified by:
newCondition in interface Lock

tryLock

public boolean tryLock()
Specified by:
tryLock in interface Lock

tryLock

public boolean tryLock(long time,
                       TimeUnit unit)
Specified by:
tryLock in interface Lock

unlock

public void unlock()
Specified by:
unlock in interface Lock

lockedFileChannel

public FileChannel lockedFileChannel()
Returns the FileLock.channel() associated with the file lock.

Returns:
a FileChannel instance.

ModeShape Distribution 3.0.0.Beta4

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.