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