public class ConnectionTableNIO extends BasicConnectionTable implements java.lang.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,
java.net.InetAddress bind_addr,
java.net.InetAddress external_addr,
int external_port,
int srv_port,
int max_port) |
ConnectionTableNIO(BasicConnectionTable.Receiver r,
java.net.InetAddress bind_addr,
java.net.InetAddress external_addr,
int external_port,
int srv_port,
int max_port,
boolean doStart) |
ConnectionTableNIO(BasicConnectionTable.Receiver r,
java.net.InetAddress bind_addr,
java.net.InetAddress external_addr,
int external_port,
int srv_port,
int max_port,
long reaper_interval,
long conn_expire_time) |
ConnectionTableNIO(BasicConnectionTable.Receiver r,
java.net.InetAddress bind_addr,
java.net.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 java.net.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,
java.nio.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 java.lang.Exception
srv_port
- java.lang.Exception
public ConnectionTableNIO(int srv_port, long reaper_interval, long conn_expire_time) throws java.lang.Exception
srv_port
- reaper_interval
- conn_expire_time
- java.lang.Exception
public ConnectionTableNIO(BasicConnectionTable.Receiver r, java.net.InetAddress bind_addr, java.net.InetAddress external_addr, int external_port, int srv_port, int max_port) throws java.lang.Exception
r
- bind_addr
- external_addr
- srv_port
- max_port
- java.lang.Exception
public ConnectionTableNIO(BasicConnectionTable.Receiver r, java.net.InetAddress bind_addr, java.net.InetAddress external_addr, int external_port, int srv_port, int max_port, boolean doStart) throws java.lang.Exception
java.lang.Exception
public ConnectionTableNIO(BasicConnectionTable.Receiver r, java.net.InetAddress bind_addr, java.net.InetAddress external_addr, int external_port, int srv_port, int max_port, long reaper_interval, long conn_expire_time) throws java.lang.Exception
r
- bind_addr
- external_addr
- srv_port
- max_port
- reaper_interval
- conn_expire_time
- java.lang.Exception
public ConnectionTableNIO(BasicConnectionTable.Receiver r, java.net.InetAddress bind_addr, java.net.InetAddress external_addr, int external_port, int srv_port, int max_port, long reaper_interval, long conn_expire_time, boolean doStart) throws java.lang.Exception
java.lang.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 java.lang.Exception
start
in class BasicConnectionTable
java.lang.Exception
protected void init() throws java.lang.Exception
java.lang.Exception
public void stop()
stop
in class BasicConnectionTable
public void run()
run
in interface java.lang.Runnable
protected java.net.ServerSocket createServerSocket(int start_port, int end_port) throws java.lang.Exception
java.lang.Exception
protected void runRequest(Address addr, java.nio.ByteBuffer buf) throws java.lang.InterruptedException
java.lang.InterruptedException
Copyright © 1998-2020 Red Hat. All Rights Reserved.