public final class NioOutboundPipeline extends NioPipeline implements Supplier<OutboundFrame>, OutboundPipeline
Modifier and Type | Field and Description |
---|---|
Queue<OutboundFrame> |
priorityWriteQueue |
Queue<OutboundFrame> |
writeQueue |
channel, LOAD_BALANCING_BYTE, LOAD_BALANCING_FRAME, LOAD_BALANCING_HANDLE, loadType, logger, owner, processCount, selectionKey, socketChannel
Modifier and Type | Method and Description |
---|---|
OutboundPipeline |
addLast(OutboundHandler... addedHandlers)
Adds the handlers at the end of the pipeline
No verification is done if the handler is already added and a handler
should only be added once.
|
long |
bytesPending() |
OutboundFrame |
get() |
protected Iterable<? extends ChannelHandler> |
handlers()
Returns an Iterable that can iterate over each
ChannelHandler of
the pipeline. |
long |
lastWriteTimeMillis() |
long |
load()
Get 'load' recorded by the current pipeline.
|
long |
priorityBytesPending() |
void |
process()
Called when the pipeline needs to be processed.
|
protected void |
publishMetrics() |
OutboundPipeline |
remove(OutboundHandler handler)
Removes the given handler from the pipeline.
|
OutboundPipeline |
replace(OutboundHandler oldHandler,
OutboundHandler... addedHandlers)
Replaces the old OutboundHandler by the new ones.
|
String |
toString() |
int |
totalFramesPending() |
OutboundPipeline |
wakeup()
Request to flush all data to flush from the handlers to
the network.
|
void |
write(OutboundFrame frame) |
getChannel, onError, owner, requestMigration, run
public final Queue<OutboundFrame> writeQueue
public final Queue<OutboundFrame> priorityWriteQueue
public long load()
MigratablePipeline
NioThread
load
in interface MigratablePipeline
public int totalFramesPending()
public long lastWriteTimeMillis()
public long bytesPending()
public long priorityBytesPending()
public void write(OutboundFrame frame)
public OutboundFrame get()
get
in interface Supplier<OutboundFrame>
public void process() throws Exception
NioPipeline
Any exception that leads to a termination of the connection like an IOException should not be dealt with in the handle method but should be propagated. The reason behind this is that the handle logic already is complicated enough and by pulling it out the flow will be easier to understand.
Exception
protected void publishMetrics()
protected Iterable<? extends ChannelHandler> handlers()
NioPipeline
ChannelHandler
of
the pipeline.
This method is called only by the NioPipeline.onError(Throwable)
.
handlers
in class NioPipeline
public OutboundPipeline remove(OutboundHandler handler)
OutboundPipeline
remove
in interface OutboundPipeline
handler
- the handler to remove.public OutboundPipeline addLast(OutboundHandler... addedHandlers)
OutboundPipeline
addLast
in interface OutboundPipeline
addedHandlers
- the handlers to add.public OutboundPipeline replace(OutboundHandler oldHandler, OutboundHandler... addedHandlers)
OutboundPipeline
replace
in interface OutboundPipeline
oldHandler
- the handlers to replaceaddedHandlers
- the new handlers to insert.public OutboundPipeline wakeup()
OutboundPipeline
wakeup
in interface OutboundPipeline
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.