public class DefaultWriteFuture extends DefaultIoFuture implements WriteFuture
WriteFuture
.构造器和说明 |
---|
DefaultWriteFuture(IoSession session)
Creates a new instance.
|
DefaultWriteFuture(IoSession session,
java.lang.Object lock)
Creates a new instance which uses the specified object as a lock.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
isWritten()
Returns true if the write operation is finished successfully.
|
static WriteFuture |
newNotWrittenFuture(IoSession session)
Returns a new
DefaultWriteFuture which is already marked as 'not written'. |
static WriteFuture |
newWrittenFuture(IoSession session)
Returns a new
DefaultWriteFuture which is already marked as 'written'. |
void |
setWritten(boolean written)
Sets whether the message is written or not, and notifies all threads
waiting for this future.
|
addListener, getLock, getSession, getValue, isReady, join, join, removeListener, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListener, getLock, getSession, isReady, join, join, removeListener
public DefaultWriteFuture(IoSession session)
public DefaultWriteFuture(IoSession session, java.lang.Object lock)
public static WriteFuture newWrittenFuture(IoSession session)
DefaultWriteFuture
which is already marked as 'written'.public static WriteFuture newNotWrittenFuture(IoSession session)
DefaultWriteFuture
which is already marked as 'not written'.public boolean isWritten()
WriteFuture
isWritten
在接口中 WriteFuture
public void setWritten(boolean written)
WriteFuture
setWritten
在接口中 WriteFuture