org.apache.catalina.tribes.transport.nio
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.SocketChannel channel,
byte[] command)
send a reply-acknowledgement (6,2,3)
|
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.SocketChannel channel, byte[] command)
key
- channel
- public void setRxBufSize(int rxBufSize)
public int getRxBufSize()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.