public class ReadWriteLock
extends java.lang.Object
| Modifier and Type | Class and Description | 
|---|---|
| protected class  | ReadWriteLock.ActionPerformedListenerListener performing post-action operations. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected Future<java.lang.Void> | finishedfutureFuture for notifying finished condition. | 
| protected java.util.LinkedList<IResultCommand<IFuture<java.lang.Void>,java.lang.Void>> | readbacklogBacklog of read requests | 
| protected int | readsNumber of read operations in progress | 
| protected boolean | writeFlag of the write operation in progress | 
| protected java.util.LinkedList<IResultCommand<IFuture<java.lang.Void>,java.lang.Void>> | writebacklogBacklog of write requests | 
| Constructor and Description | 
|---|
| ReadWriteLock() | 
| Modifier and Type | Method and Description | 
|---|---|
| IFuture<java.lang.Void> | notifyWhenFinished()Returns a future notifying if/when the operations queue is currently empty. | 
| void | scheduleRead(IResultCommand<IFuture<java.lang.Void>,java.lang.Void> readcommand)Schedules a read operation. | 
| void | scheduleWrite(IResultCommand<IFuture<java.lang.Void>,java.lang.Void> writecommand)Schedules a write operation. | 
protected int reads
protected boolean write
protected java.util.LinkedList<IResultCommand<IFuture<java.lang.Void>,java.lang.Void>> readbacklog
protected java.util.LinkedList<IResultCommand<IFuture<java.lang.Void>,java.lang.Void>> writebacklog
protected Future<java.lang.Void> finishedfuture
public void scheduleRead(IResultCommand<IFuture<java.lang.Void>,java.lang.Void> readcommand)
readcommand - The read command.public void scheduleWrite(IResultCommand<IFuture<java.lang.Void>,java.lang.Void> writecommand)
writecommand - The write operation.public IFuture<java.lang.Void> notifyWhenFinished()