TrueZIP Kernel 7.0-rc2

de.schlichtherle.truezip.fs
Class FsConcurrentModel

java.lang.Object
  extended by de.schlichtherle.truezip.fs.FsModel
      extended by de.schlichtherle.truezip.fs.FsDecoratingModel<FsModel>
          extended by de.schlichtherle.truezip.fs.FsConcurrentModel

@ThreadSafe
@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
public class FsConcurrentModel
extends FsDecoratingModel<FsModel>

Supports multiple concurrent reader threads.

Author:
Christian Schlichtherle
See Also:
FsConcurrentController

Field Summary
private  ReentrantReadWriteLock lock
           
 
Fields inherited from class de.schlichtherle.truezip.fs.FsDecoratingModel
delegate
 
Constructor Summary
FsConcurrentModel(FsModel model)
           
 
Method Summary
 void assertNotReadLockedByCurrentThread(FsNotWriteLockedException ex)
           
 void assertWriteLockedByCurrentThread()
           
 ReentrantReadWriteLock.ReadLock readLock()
           
 ReentrantReadWriteLock.WriteLock writeLock()
           
 
Methods inherited from class de.schlichtherle.truezip.fs.FsDecoratingModel
getMountPoint, getParent, isTouched, setTouched, toString
 
Methods inherited from class de.schlichtherle.truezip.fs.FsModel
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

lock

private final ReentrantReadWriteLock lock
Constructor Detail

FsConcurrentModel

public FsConcurrentModel(FsModel model)
Method Detail

readLock

public final ReentrantReadWriteLock.ReadLock readLock()

writeLock

public final ReentrantReadWriteLock.WriteLock writeLock()

assertWriteLockedByCurrentThread

public final void assertWriteLockedByCurrentThread()
                                            throws FsNotWriteLockedException
Throws:
FsNotWriteLockedException - if the write lock is not held by the current thread.

assertNotReadLockedByCurrentThread

public final void assertNotReadLockedByCurrentThread(FsNotWriteLockedException ex)
                                              throws FsNotWriteLockedException
Throws:
FsNotWriteLockedException - if the read lock is held by the current thread.

TrueZIP Kernel 7.0-rc2

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.