public class ConnectionTableNIO extends BasicConnectionTable implements Runnable
Modifier and Type | Class and Description |
---|---|
static class |
ConnectionTableNIO.MyFuture |
static class |
ConnectionTableNIO.SelectorWriteHandler |
static class |
ConnectionTableNIO.WriteRequest |
BasicConnectionTable.ConnectionListener, BasicConnectionTable.Receiver
log, socket_factory
Constructor and Description |
---|
ConnectionTableNIO(BasicConnectionTable.Receiver r,
InetAddress bind_addr,
InetAddress external_addr,
int external_port,
int srv_port,
int max_port) |
ConnectionTableNIO(BasicConnectionTable.Receiver r,
InetAddress bind_addr,
InetAddress external_addr,
int external_port,
int srv_port,
int max_port,
boolean doStart) |
ConnectionTableNIO(BasicConnectionTable.Receiver r,
InetAddress bind_addr,
InetAddress external_addr,
int external_port,
int srv_port,
int max_port,
long reaper_interval,
long conn_expire_time) |
ConnectionTableNIO(BasicConnectionTable.Receiver r,
InetAddress bind_addr,
InetAddress external_addr,
int external_port,
int srv_port,
int max_port,
long reaper_interval,
long conn_expire_time,
boolean doStart) |
ConnectionTableNIO(int srv_port) |
ConnectionTableNIO(int srv_port,
long reaper_interval,
long conn_expire_time) |
Modifier and Type | Method and Description |
---|---|
protected ServerSocket |
createServerSocket(int start_port,
int end_port)
Finds first available port starting at start_port and returns server socket.
|
long |
getProcessorKeepAliveTime() |
int |
getProcessorMaxThreads() |
int |
getProcessorMinThreads() |
int |
getProcessorQueueSize() |
int |
getProcessorThreads() |
int |
getReaderThreads() |
int |
getWriterThreads() |
protected void |
init() |
void |
run()
Acceptor thread.
|
protected void |
runRequest(Address addr,
ByteBuffer buf) |
void |
setProcessorKeepAliveTime(long m_processor_keepAliveTime) |
void |
setProcessorMaxThreads(int m_processor_maxThreads) |
void |
setProcessorMinThreads(int m_processor_minThreads) |
void |
setProcessorQueueSize(int m_processor_queueSize) |
void |
setProcessorThreads(int m_processor_threads) |
void |
setReaderThreads(int m_reader_threads) |
void |
setWriterThreads(int m_writer_threads) |
void |
start() |
void |
stop()
Closes all open sockets, the server socket and all threads waiting for incoming messages
|
addConnectionListener, getLinger, getLocalAddress, getNumberOfConnectionCreations, getNumConnections, getPeerAddressReadTimeout, getReceiveBufferSize, getSendBufferSize, getSendQueueSize, getSocketConnectionTimeout, getSocketFactory, getTcpNodelay, getThreadFactory, getUseSendQueues, receive, removeConnection, removeConnectionListener, retainAll, send, setLinger, setPeerAddressReadTimeout, setReceiveBufferSize, setReceiver, setSendBufferSize, setSendQueueSize, setSocketConnectionTimeout, setSocketFactory, setTcpNodelay, setThreadFactory, setUseSendQueues, toString
public ConnectionTableNIO(int srv_port) throws Exception
srv_port
- Exception
public ConnectionTableNIO(int srv_port, long reaper_interval, long conn_expire_time) throws Exception
srv_port
- reaper_interval
- conn_expire_time
- Exception
public ConnectionTableNIO(BasicConnectionTable.Receiver r, InetAddress bind_addr, InetAddress external_addr, int external_port, int srv_port, int max_port) throws Exception
r
- bind_addr
- external_addr
- srv_port
- max_port
- Exception
public ConnectionTableNIO(BasicConnectionTable.Receiver r, InetAddress bind_addr, InetAddress external_addr, int external_port, int srv_port, int max_port, boolean doStart) throws Exception
Exception
public ConnectionTableNIO(BasicConnectionTable.Receiver r, InetAddress bind_addr, InetAddress external_addr, int external_port, int srv_port, int max_port, long reaper_interval, long conn_expire_time) throws Exception
r
- bind_addr
- external_addr
- srv_port
- max_port
- reaper_interval
- conn_expire_time
- Exception
public ConnectionTableNIO(BasicConnectionTable.Receiver r, InetAddress bind_addr, InetAddress external_addr, int external_port, int srv_port, int max_port, long reaper_interval, long conn_expire_time, boolean doStart) throws Exception
Exception
public int getReaderThreads()
public void setReaderThreads(int m_reader_threads)
public int getWriterThreads()
public void setWriterThreads(int m_writer_threads)
public int getProcessorThreads()
public void setProcessorThreads(int m_processor_threads)
public int getProcessorMinThreads()
public void setProcessorMinThreads(int m_processor_minThreads)
public int getProcessorMaxThreads()
public void setProcessorMaxThreads(int m_processor_maxThreads)
public int getProcessorQueueSize()
public void setProcessorQueueSize(int m_processor_queueSize)
public long getProcessorKeepAliveTime()
public void setProcessorKeepAliveTime(long m_processor_keepAliveTime)
public final void start() throws Exception
start
in class BasicConnectionTable
Exception
public void stop()
stop
in class BasicConnectionTable
public void run()
protected ServerSocket createServerSocket(int start_port, int end_port) throws Exception
Exception
protected void runRequest(Address addr, ByteBuffer buf) throws InterruptedException
InterruptedException
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.