public class JniSelectManager extends AbstractSelectManager implements java.lang.Runnable
Modifier and Type | Method and Description |
---|---|
int |
addNative(long manager,
int fd) |
void |
closeKeepalive(TcpSocketLink conn) |
int |
closeNative(long manager) |
static JniSelectManager |
create()
Returns a jni select manager.
|
long |
createNative() |
protected void |
finalize() |
int |
freeNative(long manager) |
long |
getCheckInterval()
Returns the check interface.
|
int |
getFreeKeepalive()
Returns the available keepalive.
|
static java.lang.String |
getInitMessage() |
int |
getSelectCount()
Returns the keepalive count.
|
int |
getSelectMax()
Sets the max select.
|
void |
initNative(long fd) |
boolean |
isActive() |
static boolean |
isEnabled() |
boolean |
keepalive(TcpSocketLink tcpConn)
Adds a keepalive connection.
|
void |
onPortClose(TcpPort port) |
int |
removeNative(long manager,
int fd) |
void |
run()
Running process accepting connections.
|
int |
selectNative(long manager,
long timeout,
long[] resultFds) |
void |
setCheckInterval(long checkInterval)
Sets the check interval.
|
void |
setSelectMax(int max)
Sets the max select.
|
void |
setSelectTimeout(long timeout)
Sets the select timeout
|
boolean |
start()
Starts the manager.
|
boolean |
stop()
Closing the manager.
|
java.lang.String |
toString() |
close
public static JniSelectManager create()
public static boolean isEnabled()
public static java.lang.String getInitMessage()
public int getFreeKeepalive()
getFreeKeepalive
in class AbstractSelectManager
public int getSelectCount()
getSelectCount
in class AbstractSelectManager
public void setSelectMax(int max)
setSelectMax
in class AbstractSelectManager
public int getSelectMax()
getSelectMax
in class AbstractSelectManager
public void setSelectTimeout(long timeout)
setSelectTimeout
in class AbstractSelectManager
public long getCheckInterval()
public void setCheckInterval(long checkInterval)
public boolean isActive()
public boolean start()
start
in class AbstractSelectManager
public boolean keepalive(TcpSocketLink tcpConn)
keepalive
in class AbstractSelectManager
conn
- the connection to register as keepalivepublic void closeKeepalive(TcpSocketLink conn)
closeKeepalive
in class AbstractSelectManager
public void run()
run
in interface java.lang.Runnable
public void onPortClose(TcpPort port)
onPortClose
in class AbstractSelectManager
public boolean stop()
stop
in class AbstractSelectManager
protected void finalize()
finalize
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public long createNative()
public void initNative(long fd)
public int addNative(long manager, int fd) throws java.io.IOException
java.io.IOException
public int removeNative(long manager, int fd) throws java.io.IOException
java.io.IOException
public int selectNative(long manager, long timeout, long[] resultFds) throws java.io.IOException
java.io.IOException
public int closeNative(long manager)
public int freeNative(long manager)