|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.alisoft.xplatform.asf.cache.memcached.client.SockIOPool.SockIO
public static class SockIOPool.SockIO
MemCached Java client, utility class for Socket IO. This class is a wrapper around a Socket and its streams.
| 构造方法摘要 | |
|---|---|
SockIOPool.SockIO(SockIOPool pool,
java.lang.String host,
int timeout,
int connectTimeout,
boolean noDelay)
creates a new SockIO object wrapping a socket connection to host:port, and its input and output streams |
|
SockIOPool.SockIO(SockIOPool pool,
java.lang.String host,
int port,
int timeout,
int connectTimeout,
boolean noDelay)
creates a new SockIO object wrapping a socket connection to host:port, and its input and output streams |
|
| 方法摘要 | |
|---|---|
protected void |
finalize()
Hack to reap any leaking children. |
java.nio.channels.SocketChannel |
getChannel()
Lets caller get access to underlying channel. |
java.lang.String |
getHost()
returns the host this socket is connected to |
protected static java.net.Socket |
getSocket(java.lang.String host,
int port,
int timeout)
Method which gets a connection from SocketChannel. |
int |
hashCode()
use the sockets hashcode for this object so we can key off of SockIOs |
byte[] |
readBytes(int length)
|
java.lang.String |
readLine()
reads a line intentionally not using the deprecated readLine method from DataInputStream |
java.lang.String |
toString()
returns the string representation of this socket |
void |
trueClose()
closes socket and all streams connected to it |
void |
trueClose(boolean addToDeadPool)
closes socket and all streams connected to it |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, getClass, notify, notifyAll, wait, wait, wait |
| 构造方法详细信息 |
|---|
public SockIOPool.SockIO(SockIOPool pool,
java.lang.String host,
int port,
int timeout,
int connectTimeout,
boolean noDelay)
throws java.io.IOException,
java.net.UnknownHostException
pool - Pool this object is tied tohost - host to connect toport - port to connect totimeout - int ms to block on data for readconnectTimeout - timeout (in ms) for initial connectionnoDelay - TCP NODELAY option?
java.io.IOException - if an io error occurrs when creating socket
java.net.UnknownHostException - if hostname is invalid
public SockIOPool.SockIO(SockIOPool pool,
java.lang.String host,
int timeout,
int connectTimeout,
boolean noDelay)
throws java.io.IOException,
java.net.UnknownHostException
host - hostname:porttimeout - read timeout value for connected socketconnectTimeout - timeout for initial connectionsnoDelay - TCP NODELAY option?
java.io.IOException - if an io error occurrs when creating socket
java.net.UnknownHostException - if hostname is invalid| 方法详细信息 |
|---|
protected static java.net.Socket getSocket(java.lang.String host,
int port,
int timeout)
throws java.io.IOException
host - host to establish connection toport - port on that hosttimeout - connection timeout in ms
java.io.IOException - if errors connecting or if connection times outpublic java.nio.channels.SocketChannel getChannel()
public java.lang.String getHost()
public void trueClose()
throws java.io.IOException
java.io.IOException - if fails to close streams or socket
public void trueClose(boolean addToDeadPool)
throws java.io.IOException
java.io.IOException - if fails to close streams or socket
public byte[] readBytes(int length)
throws java.io.IOException
java.io.IOException
public java.lang.String readLine()
throws java.io.IOException
java.io.IOException - if io problems during readpublic int hashCode()
java.lang.Object 中的 hashCodepublic java.lang.String toString()
java.lang.Object 中的 toString
protected void finalize()
throws java.lang.Throwable
java.lang.Object 中的 finalizejava.lang.Throwable
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||