Package org.redisson.connection.pool
Class MasterConnectionPool
- java.lang.Object
-
- org.redisson.connection.pool.MasterConnectionPool
-
public class MasterConnectionPool extends Object
Connection pool for master node- Author:
- Nikita Koksharov
-
-
Field Summary
Fields Modifier and Type Field Description protected Queue<ClientConnectionsEntry>entries
-
Constructor Summary
Constructors Constructor Description MasterConnectionPool(MasterSlaveServersConfig config, ConnectionManager connectionManager, MasterSlaveEntry masterSlaveEntry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RFuture<T>acquireConnection(RedisCommand<?> command, ClientConnectionsEntry entry)protected voidacquireConnection(ClientConnectionsEntry entry, Runnable runnable)RFuture<Void>add(ClientConnectionsEntry entry)protected RFuture<T>connect(ClientConnectionsEntry entry)RFuture<RedisConnection>get(RedisCommand<?> command)RFuture<T>get(RedisCommand<?> command, ClientConnectionsEntry entry)protected intgetMinimumIdleSize(ClientConnectionsEntry entry)RPromise<Void>initConnections(ClientConnectionsEntry entry)protected Tpoll(ClientConnectionsEntry entry)protected voidreleaseConnection(ClientConnectionsEntry entry)protected voidreleaseConnection(ClientConnectionsEntry entry, T conn)voidremove(ClientConnectionsEntry entry)voidreturnConnection(ClientConnectionsEntry entry, T connection)protected booleantryAcquireConnection(ClientConnectionsEntry entry)
-
-
-
Field Detail
-
entries
protected final Queue<ClientConnectionsEntry> entries
-
-
Constructor Detail
-
MasterConnectionPool
public MasterConnectionPool(MasterSlaveServersConfig config, ConnectionManager connectionManager, MasterSlaveEntry masterSlaveEntry)
-
-
Method Detail
-
get
public RFuture<RedisConnection> get(RedisCommand<?> command)
-
remove
public void remove(ClientConnectionsEntry entry)
-
getMinimumIdleSize
protected int getMinimumIdleSize(ClientConnectionsEntry entry)
-
add
public RFuture<Void> add(ClientConnectionsEntry entry)
-
initConnections
public RPromise<Void> initConnections(ClientConnectionsEntry entry)
-
acquireConnection
protected void acquireConnection(ClientConnectionsEntry entry, Runnable runnable)
-
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)
-
poll
protected T poll(ClientConnectionsEntry entry)
-
connect
protected RFuture<T> connect(ClientConnectionsEntry entry)
-
returnConnection
public void returnConnection(ClientConnectionsEntry entry, T connection)
-
releaseConnection
protected void releaseConnection(ClientConnectionsEntry entry)
-
releaseConnection
protected void releaseConnection(ClientConnectionsEntry entry, T conn)
-
-