Package org.redisson.connection.pool
Class PubSubConnectionPool
- java.lang.Object
-
- org.redisson.connection.pool.PubSubConnectionPool
-
- Direct Known Subclasses:
MasterPubSubConnectionPool
public class PubSubConnectionPool extends Object
Connection pool for Publish / Subscribe- Author:
- Nikita Koksharov
-
-
Field Summary
Fields Modifier and Type Field Description protected Queue<ClientConnectionsEntry>
entries
-
Constructor Summary
Constructors Constructor Description PubSubConnectionPool(MasterSlaveServersConfig config, ConnectionManager connectionManager, MasterSlaveEntry masterSlaveEntry)
-
Method Summary
-
-
-
Field Detail
-
entries
protected final Queue<ClientConnectionsEntry> entries
-
-
Constructor Detail
-
PubSubConnectionPool
public PubSubConnectionPool(MasterSlaveServersConfig config, ConnectionManager connectionManager, MasterSlaveEntry masterSlaveEntry)
-
-
Method Detail
-
get
public RFuture<RedisPubSubConnection> get()
-
poll
protected RedisPubSubConnection poll(ClientConnectionsEntry entry, RedisCommand<?> command)
-
getMinimumIdleSize
protected int getMinimumIdleSize(ClientConnectionsEntry entry)
-
connect
protected RFuture<RedisPubSubConnection> connect(ClientConnectionsEntry entry)
-
acquireConnection
protected void acquireConnection(ClientConnectionsEntry entry, Runnable runnable, RedisCommand<?> command)
-
releaseConnection
protected void releaseConnection(ClientConnectionsEntry entry)
-
releaseConnection
protected void releaseConnection(ClientConnectionsEntry entry, RedisPubSubConnection conn)
-
add
public RFuture<Void> add(ClientConnectionsEntry entry)
-
initConnections
public RPromise<Void> initConnections(ClientConnectionsEntry entry)
-
get
public RFuture<T> get(RedisCommand<?> command)
-
get
public RFuture<T> get(RedisCommand<?> command, ClientConnectionsEntry entry)
-
acquireConnection
protected final RFuture<T> acquireConnection(RedisCommand<?> command, ClientConnectionsEntry entry)
-
tryAcquireConnection
protected boolean tryAcquireConnection(ClientConnectionsEntry entry)
-
returnConnection
public void returnConnection(ClientConnectionsEntry entry, T connection)
-
-