public class SocketConnectionPool extends PoolBase<Socket> implements ConnectionPool<Socket>
SocketConnectionPool
Socket连接池
PoolBase,
ConnectionPool,
序列化表格internalPool| 构造器和说明 |
|---|
SocketConnectionPool()
默认构造方法
|
SocketConnectionPool(PoolConfig poolConfig,
Properties properties) |
SocketConnectionPool(PoolConfig poolConfig,
String host,
int port) |
SocketConnectionPool(PoolConfig poolConfig,
String host,
int port,
int bufferSize,
int timeout) |
SocketConnectionPool(PoolConfig poolConfig,
String host,
int port,
int bufferSize,
int timeout,
int linger) |
SocketConnectionPool(PoolConfig poolConfig,
String host,
int port,
int bufferSize,
int timeout,
int linger,
boolean keepAlive,
boolean tcpNoDelay) |
SocketConnectionPool(PoolConfig poolConfig,
String host,
int port,
int bufferSize,
int timeout,
int linger,
boolean keepAlive,
boolean tcpNoDelay,
String[] performance) |
SocketConnectionPool(Properties properties) |
| 限定符和类型 | 方法和说明 |
|---|---|
Socket |
getConnection()
Title: getConnection
Description: 获取连接
|
void |
invalidateConnection(Socket conn)
Title: invalidateConnection
Description: 废弃连接
|
void |
returnConnection(Socket conn)
Title: returnConnection
Description: 返回连接
|
addObjects, clear, close, destroy, getMaxBorrowWaitTimeMillis, getMeanBorrowWaitTimeMillis, getNumActive, getNumIdle, getNumWaiters, getResource, initPool, invalidateResource, isClosed, returnResourcepublic SocketConnectionPool()
public SocketConnectionPool(Properties properties)
properties - 参数配置public SocketConnectionPool(PoolConfig poolConfig, Properties properties)
poolConfig - 池配置properties - 参数配置public SocketConnectionPool(PoolConfig poolConfig, String host, int port)
poolConfig - 池配置host - 地址port - 端口public SocketConnectionPool(PoolConfig poolConfig, String host, int port, int bufferSize, int timeout)
poolConfig - 池配置host - 地址port - 端口bufferSize - 缓存大小timeout - 超时时间public SocketConnectionPool(PoolConfig poolConfig, String host, int port, int bufferSize, int timeout, int linger)
poolConfig - 池配置host - 地址port - 端口bufferSize - 缓存大小timeout - 超时时间linger - 逗留时间public SocketConnectionPool(PoolConfig poolConfig, String host, int port, int bufferSize, int timeout, int linger, boolean keepAlive, boolean tcpNoDelay)
poolConfig - 池配置host - 地址port - 端口bufferSize - 缓存大小timeout - 超时时间linger - 逗留时间keepAlive - 保持活动tcpNoDelay - 不延迟public SocketConnectionPool(PoolConfig poolConfig, String host, int port, int bufferSize, int timeout, int linger, boolean keepAlive, boolean tcpNoDelay, String[] performance)
poolConfig - 池配置host - 地址port - 端口bufferSize - 缓存大小timeout - 超时时间linger - 逗留时间keepAlive - 保持活动tcpNoDelay - 不延迟performance - 性能属性public Socket getConnection()
ConnectionPoolTitle: getConnection
Description: 获取连接
getConnection 在接口中 ConnectionPool<Socket>public void returnConnection(Socket conn)
ConnectionPoolTitle: returnConnection
Description: 返回连接
returnConnection 在接口中 ConnectionPool<Socket>conn - 连接public void invalidateConnection(Socket conn)
ConnectionPoolTitle: invalidateConnection
Description: 废弃连接
invalidateConnection 在接口中 ConnectionPool<Socket>conn - 连接Copyright © 2015-2016 Dark Phoenixs. All Rights Reserved.