public final class ChannelFlushPromiseNotifier
extends java.lang.Object
ChannelFuture
instances which will get notified once some amount of
data was written and so a checkpoint was reached.构造器和说明 |
---|
ChannelFlushPromiseNotifier()
Create a new instance which will use
ChannelPromise.setSuccess() and
ChannelPromise.setFailure(Throwable) to notify the ChannelPromise s. |
ChannelFlushPromiseNotifier(boolean tryNotify)
Create a new instance
|
限定符和类型 | 方法和说明 |
---|---|
ChannelFlushPromiseNotifier |
add(ChannelPromise promise,
int pendingDataSize)
已过时。
|
ChannelFlushPromiseNotifier |
add(ChannelPromise promise,
long pendingDataSize)
Add a
ChannelPromise to this ChannelFlushPromiseNotifier which will be notified after the given
pendingDataSize was reached. |
ChannelFlushPromiseNotifier |
increaseWriteCounter(long delta)
Increase the current write counter by the given delta
|
ChannelFlushPromiseNotifier |
notifyFlushFutures()
已过时。
use
notifyPromises() |
ChannelFlushPromiseNotifier |
notifyFlushFutures(java.lang.Throwable cause)
已过时。
|
ChannelFlushPromiseNotifier |
notifyFlushFutures(java.lang.Throwable cause1,
java.lang.Throwable cause2)
已过时。
|
ChannelFlushPromiseNotifier |
notifyPromises()
Notify all
ChannelFuture s that were registered with add(ChannelPromise, int) and
their pendingDatasize is smaller after the current writeCounter returned by writeCounter() . |
ChannelFlushPromiseNotifier |
notifyPromises(java.lang.Throwable cause)
Notify all
ChannelFuture s that were registered with add(ChannelPromise, int) and
their pendingDatasize isis smaller then the current writeCounter returned by writeCounter() . |
ChannelFlushPromiseNotifier |
notifyPromises(java.lang.Throwable cause1,
java.lang.Throwable cause2)
Notify all
ChannelFuture s that were registered with add(ChannelPromise, int) and
their pendingDatasize is smaller then the current writeCounter returned by writeCounter() using
the given cause1. |
long |
writeCounter()
Return the current write counter of this
ChannelFlushPromiseNotifier |
public ChannelFlushPromiseNotifier(boolean tryNotify)
tryNotify
- if true
the ChannelPromise
s will get notified with
ChannelPromise.trySuccess()
and Promise.tryFailure(Throwable)
.
Otherwise ChannelPromise.setSuccess()
and ChannelPromise.setFailure(Throwable)
is usedpublic ChannelFlushPromiseNotifier()
ChannelPromise.setSuccess()
and
ChannelPromise.setFailure(Throwable)
to notify the ChannelPromise
s.@Deprecated public ChannelFlushPromiseNotifier add(ChannelPromise promise, int pendingDataSize)
add(ChannelPromise, long)
public ChannelFlushPromiseNotifier add(ChannelPromise promise, long pendingDataSize)
ChannelPromise
to this ChannelFlushPromiseNotifier
which will be notified after the given
pendingDataSize
was reached.public ChannelFlushPromiseNotifier increaseWriteCounter(long delta)
public long writeCounter()
ChannelFlushPromiseNotifier
public ChannelFlushPromiseNotifier notifyPromises()
ChannelFuture
s that were registered with add(ChannelPromise, int)
and
their pendingDatasize is smaller after the current writeCounter returned by writeCounter()
.
After a ChannelFuture
was notified it will be removed from this ChannelFlushPromiseNotifier
and
so not receive anymore notification.@Deprecated public ChannelFlushPromiseNotifier notifyFlushFutures()
notifyPromises()
public ChannelFlushPromiseNotifier notifyPromises(java.lang.Throwable cause)
ChannelFuture
s that were registered with add(ChannelPromise, int)
and
their pendingDatasize isis smaller then the current writeCounter returned by writeCounter()
.
After a ChannelFuture
was notified it will be removed from this ChannelFlushPromiseNotifier
and
so not receive anymore notification.
The rest of the remaining ChannelFuture
s will be failed with the given Throwable
.
So after this operation this ChannelFutureListener
is empty.@Deprecated public ChannelFlushPromiseNotifier notifyFlushFutures(java.lang.Throwable cause)
notifyPromises(Throwable)
public ChannelFlushPromiseNotifier notifyPromises(java.lang.Throwable cause1, java.lang.Throwable cause2)
ChannelFuture
s that were registered with add(ChannelPromise, int)
and
their pendingDatasize is smaller then the current writeCounter returned by writeCounter()
using
the given cause1.
After a ChannelFuture
was notified it will be removed from this ChannelFlushPromiseNotifier
and
so not receive anymore notification.
The rest of the remaining ChannelFuture
s will be failed with the given Throwable
.
So after this operation this ChannelFutureListener
is empty.cause1
- the Throwable
which will be used to fail all of the ChannelFuture
s which
pendingDataSize is smaller then the current writeCounter returned by writeCounter()
cause2
- the Throwable
which will be used to fail the remaining ChannelFuture
s@Deprecated public ChannelFlushPromiseNotifier notifyFlushFutures(java.lang.Throwable cause1, java.lang.Throwable cause2)
notifyPromises(Throwable, Throwable)