public final class NioChannelReader extends AbstractHandler
NioThread receives a read event from the Selector, then the
handle() is called to read out the data from the socket into a bytebuffer and hand it over to the
ChannelInboundHandler to get processed.| Modifier and Type | Field and Description |
|---|---|
protected ByteBuffer |
inputBuffer |
channel, completedMigrations, handleCount, ioThread, LOAD_BALANCING_BYTE, LOAD_BALANCING_FRAME, LOAD_BALANCING_HANDLE, LOAD_TYPE, logger, selectionKey| Constructor and Description |
|---|
NioChannelReader(NioChannel channel,
NioThread ioThread,
ILogger logger,
IOBalancer balancer,
ChannelInitializer initializer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getLoad()
Get 'load' recorded by the current handler.
|
SwCounter |
getNormalFramesReadCounter() |
SwCounter |
getPriorityFramesReadCounter() |
void |
handle()
Called when there are bytes available for reading, or space available to write.
|
long |
lastReadTimeMillis() |
void |
publish() |
void |
requestMigration(NioThread newOwner)
Migrates this handler to a new NioThread.
|
String |
toString() |
getChannel, getOwner, onFailure, startprotected ByteBuffer inputBuffer
public NioChannelReader(NioChannel channel, NioThread ioThread, ILogger logger, IOBalancer balancer, ChannelInitializer initializer)
public long getLoad()
MigratableHandlerNioThreadpublic SwCounter getNormalFramesReadCounter()
public SwCounter getPriorityFramesReadCounter()
public long lastReadTimeMillis()
public void requestMigration(NioThread newOwner)
newOwner - target NioThread this handler migrates topublic void handle()
throws Exception
SelectionHandlerExceptionpublic void publish()
publish in class AbstractHandlerpublic void close()
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.