@ThreadSafe @DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) public final class FsConcurrentModel extends FsDecoratingModel<FsModel>
FsConcurrentController| Modifier and Type | Field and Description |
|---|---|
private ReentrantReadWriteLock |
lock |
delegate| Constructor and Description |
|---|
FsConcurrentModel(FsModel model) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
assertNotReadLockedByCurrentThread(FsNotWriteLockedException ex)
Asserts that the read lock is not held by the current thread,
so that the caller can safely acquire the write lock without dead
locking.
|
void |
assertWriteLockedByCurrentThread()
Asserts that the write lock is held by the current thread.
|
boolean |
isWriteLockedByCurrentThread()
Returns
true if and only if the write lock is held by the
current thread. |
ReentrantReadWriteLock.ReadLock |
readLock() |
ReentrantReadWriteLock.WriteLock |
writeLock() |
getMountPoint, getParent, isTouched, setTouched, toStringprivate final ReentrantReadWriteLock lock
public FsConcurrentModel(FsModel model)
void assertNotReadLockedByCurrentThread(@CheckForNull FsNotWriteLockedException ex) throws FsNotWriteLockedException
ex - the caught exception.FsNotWriteLockedException - if the read lock is
held by the current thread.public void assertWriteLockedByCurrentThread()
throws FsNotWriteLockedException
FsNotWriteLockedException - if the write lock is not
held by the current thread.isWriteLockedByCurrentThread()public boolean isWriteLockedByCurrentThread()
true if and only if the write lock is held by the
current thread.
This method should only get used for assert statements, not for lock
control!true if and only if the write lock is held by the
current thread.assertWriteLockedByCurrentThread()public ReentrantReadWriteLock.ReadLock readLock()
public ReentrantReadWriteLock.WriteLock writeLock()
Copyright © 2004-2011 Schlichtherle IT Services. All Rights Reserved.