public final class NioChannelWriter extends AbstractHandler implements Runnable
| Modifier and Type | Field and Description |
|---|---|
Queue<OutboundFrame> |
urgentWriteQueue |
Queue<OutboundFrame> |
writeQueue |
channel, completedMigrations, handleCount, ioThread, LOAD_BALANCING_BYTE, LOAD_BALANCING_FRAME, LOAD_BALANCING_HANDLE, LOAD_TYPE, logger, selectionKey| Constructor and Description |
|---|
NioChannelWriter(NioChannel channel,
NioThread ioThread,
ILogger logger,
IOBalancer balancer,
ChannelInitializer initializer) |
| Modifier and Type | Method and Description |
|---|---|
long |
bytesPending() |
void |
close() |
void |
flush() |
long |
getLoad()
Get 'load' recorded by the current handler.
|
void |
handle()
Called when there are bytes available for reading, or space available to write.
|
long |
lastWriteTimeMillis() |
long |
priorityBytesPending() |
protected void |
publish() |
void |
requestMigration(NioThread newOwner)
Requests the MigratableHandler to move to the new NioThread.
|
void |
run() |
String |
toString() |
int |
totalFramesPending() |
void |
write(OutboundFrame frame) |
getChannel, getOwner, onFailure, startpublic final Queue<OutboundFrame> writeQueue
public final Queue<OutboundFrame> urgentWriteQueue
public NioChannelWriter(NioChannel channel, NioThread ioThread, ILogger logger, IOBalancer balancer, ChannelInitializer initializer)
public long getLoad()
MigratableHandlerNioThreadgetLoad in interface MigratableHandlerpublic int totalFramesPending()
public long lastWriteTimeMillis()
public long bytesPending()
public long priorityBytesPending()
public void flush()
public void write(OutboundFrame frame)
public void handle()
throws Exception
SelectionHandlerhandle in interface SelectionHandlerExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic void requestMigration(NioThread newOwner)
MigratableHandlerIOBalancer.
Call is ignored when handler is moving to the same NioThread.requestMigration in interface MigratableHandlernewOwner - the NioThread that is going to own this MigratableHandlerprotected void publish()
publish in class AbstractHandlerCopyright © 2017 Hazelcast, Inc.. All Rights Reserved.