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(java.nio.channels.SelectionKey key,
ObjectReader reader)
The actual code which drains the channel associated with
the given key.
|
int |
getRxBufSize() |
protected void |
registerForRead(java.nio.channels.SelectionKey key,
ObjectReader reader) |
void |
run() |
protected void |
sendAck(java.nio.channels.SelectionKey key,
java.nio.channels.WritableByteChannel channel,
byte[] command,
java.net.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(java.nio.channels.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(java.nio.channels.SelectionKey key)
protected void drainChannel(java.nio.channels.SelectionKey key, ObjectReader reader) throws java.lang.Exception
java.lang.Exception
protected void registerForRead(java.nio.channels.SelectionKey key, ObjectReader reader)
protected void sendAck(java.nio.channels.SelectionKey key, java.nio.channels.WritableByteChannel channel, byte[] command, java.net.SocketAddress udpaddr)
key
- channel
- public void setRxBufSize(int rxBufSize)
public int getRxBufSize()
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.