public abstract class PoolTcpSource extends PoolSource<AsyncConnection>
限定符和类型 | 字段和说明 |
---|---|
protected ObjectPool<java.nio.ByteBuffer> |
bufferPool |
protected java.util.concurrent.ArrayBlockingQueue<AsyncConnection> |
connQueue |
protected java.util.concurrent.ThreadPoolExecutor |
executor |
protected java.nio.channels.AsynchronousChannelGroup |
group |
protected java.util.concurrent.ExecutorService |
pollExecutor |
attributes, closeCounter, connectTimeoutSeconds, creatCounter, cycleCounter, database, dbtype, encoding, logger, maxconns, password, props, readTimeoutSeconds, rwtype, saveCounter, semaphore, servaddr, url, username, usingCounter, writeTimeoutSeconds
构造器和说明 |
---|
PoolTcpSource(java.lang.String rwtype,
java.util.concurrent.ArrayBlockingQueue queue,
java.util.concurrent.Semaphore semaphore,
java.util.Properties prop,
java.util.logging.Logger logger,
ObjectPool<java.nio.ByteBuffer> bufferPool,
java.util.concurrent.ThreadPoolExecutor executor) |
限定符和类型 | 方法和说明 |
---|---|
void |
change(java.util.Properties prop) |
void |
close() |
void |
offerConnection(AsyncConnection conn) |
AsyncConnection |
poll() |
java.util.concurrent.CompletableFuture<AsyncConnection> |
pollAsync() |
protected java.util.concurrent.CompletableFuture<AsyncConnection> |
pollAsync(int count) |
protected abstract java.nio.ByteBuffer |
reqConnectBuffer(AsyncConnection conn) |
protected abstract void |
respConnectBuffer(java.nio.ByteBuffer buffer,
java.util.concurrent.CompletableFuture<AsyncConnection> future,
AsyncConnection conn) |
protected abstract java.util.concurrent.CompletableFuture<AsyncConnection> |
sendCloseCommand(AsyncConnection conn) |
getCloseCount, getConnectTimeoutSeconds, getCreatCount, getCycleCount, getDatabase, getDbtype, getDefaultPort, getMaxconns, getPassword, getReadTimeoutSeconds, getSaveCount, getServaddr, getUrl, getUsername, getUsingCount, getWriteTimeoutSeconds, parseAddressAndDbnameAndAttrs
protected ObjectPool<java.nio.ByteBuffer> bufferPool
protected java.util.concurrent.ThreadPoolExecutor executor
protected java.util.concurrent.ExecutorService pollExecutor
protected java.nio.channels.AsynchronousChannelGroup group
protected final java.util.concurrent.ArrayBlockingQueue<AsyncConnection> connQueue
public PoolTcpSource(java.lang.String rwtype, java.util.concurrent.ArrayBlockingQueue queue, java.util.concurrent.Semaphore semaphore, java.util.Properties prop, java.util.logging.Logger logger, ObjectPool<java.nio.ByteBuffer> bufferPool, java.util.concurrent.ThreadPoolExecutor executor)
public void offerConnection(AsyncConnection conn)
offerConnection
在类中 PoolSource<AsyncConnection>
public void change(java.util.Properties prop)
change
在类中 PoolSource<AsyncConnection>
public final AsyncConnection poll()
poll
在类中 PoolSource<AsyncConnection>
protected abstract java.nio.ByteBuffer reqConnectBuffer(AsyncConnection conn)
protected abstract void respConnectBuffer(java.nio.ByteBuffer buffer, java.util.concurrent.CompletableFuture<AsyncConnection> future, AsyncConnection conn)
public java.util.concurrent.CompletableFuture<AsyncConnection> pollAsync()
pollAsync
在类中 PoolSource<AsyncConnection>
protected java.util.concurrent.CompletableFuture<AsyncConnection> pollAsync(int count)
public void close()
close
在类中 PoolSource<AsyncConnection>
protected abstract java.util.concurrent.CompletableFuture<AsyncConnection> sendCloseCommand(AsyncConnection conn)