public class NioReplicationTask extends AbstractRxTask
OPTION_DIRECT_BUFFER, useBufferPool
Constructor and Description |
---|
NioReplicationTask(ListenCallback callback,
NioReceiver receiver) |
Modifier and Type | Method and Description |
---|---|
protected void |
drainChannel(SelectionKey key,
ObjectReader reader)
The actual code which drains the channel associated with
the given key.
|
int |
getRxBufSize() |
protected void |
registerForRead(SelectionKey key,
ObjectReader reader) |
void |
run() |
protected void |
sendAck(SelectionKey key,
WritableByteChannel channel,
byte[] command,
SocketAddress udpaddr)
send a reply-acknowledgement (6,2,3), sends it doing a busy write, the ACK is so small
that it should always go to the buffer
|
void |
serviceChannel(SelectionKey key)
Called to initiate a unit of work by this worker thread
on the provided SelectionKey object.
|
void |
setRxBufSize(int rxBufSize) |
close, getCallback, getOptions, getTaskPool, getUseBufferPool, isDoRun, setCallback, setDoRun, setOptions, setTaskPool, setUseBufferPool
public NioReplicationTask(ListenCallback callback, NioReceiver receiver)
public void run()
public void serviceChannel(SelectionKey key)
protected void drainChannel(SelectionKey key, ObjectReader reader) throws Exception
Exception
protected void registerForRead(SelectionKey key, ObjectReader reader)
protected void sendAck(SelectionKey key, WritableByteChannel channel, byte[] command, SocketAddress udpaddr)
key
- channel
- public void setRxBufSize(int rxBufSize)
public int getRxBufSize()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.