public class MasterSlaveEntry extends Object
Constructor and Description |
---|
MasterSlaveEntry(ConnectionManager connectionManager,
MasterSlaveServersConfig config) |
public MasterSlaveEntry(ConnectionManager connectionManager, MasterSlaveServersConfig config)
public MasterSlaveServersConfig getConfig()
public List<RFuture<Void>> initSlaveBalancer(Collection<RedisURI> disconnectedNodes)
public RFuture<RedisClient> setupMasterEntry(InetSocketAddress address, RedisURI uri)
public RFuture<RedisClient> setupMasterEntry(RedisURI address)
public boolean slaveDown(ClientConnectionsEntry entry, ClientConnectionsEntry.FreezeReason freezeReason)
public boolean slaveDown(InetSocketAddress address, ClientConnectionsEntry.FreezeReason freezeReason)
public boolean slaveDown(RedisURI address, ClientConnectionsEntry.FreezeReason freezeReason)
public void masterDown()
public boolean nodeDown(ClientConnectionsEntry entry)
public boolean hasSlave(RedisClient redisClient)
public boolean hasSlave(InetSocketAddress addr)
public boolean hasSlave(RedisURI addr)
public int getAvailableSlaves()
public int getAvailableClients()
public RFuture<Void> addSlave(InetSocketAddress address, RedisURI uri)
public Collection<ClientConnectionsEntry> getAllEntries()
public ClientConnectionsEntry getEntry(RedisClient redisClient)
public RedisClient getClient()
public boolean slaveUp(ClientConnectionsEntry entry, ClientConnectionsEntry.FreezeReason freezeReason)
public boolean isSlaveUnfreezed(RedisURI address)
public boolean slaveUp(RedisURI address, ClientConnectionsEntry.FreezeReason freezeReason)
public boolean slaveUp(InetSocketAddress address, ClientConnectionsEntry.FreezeReason freezeReason)
public RFuture<RedisClient> changeMaster(RedisURI address)
redis(s)://host:port
from slaves list.
Re-attach pub/sub listeners from it to other slave.
Shutdown old master client.address
- of Redispublic void changeMaster(InetSocketAddress address, RedisURI uri)
public RFuture<RedisConnection> connectionWriteOp(RedisCommand<?> command)
public RFuture<RedisConnection> redirectedConnectionWriteOp(RedisCommand<?> command, RedisURI addr)
public RFuture<RedisConnection> connectionReadOp(RedisCommand<?> command)
public RFuture<RedisConnection> connectionReadOp(RedisCommand<?> command, RedisURI addr)
public RFuture<RedisConnection> connectionReadOp(RedisCommand<?> command, RedisClient client)
public RFuture<RedisPubSubConnection> nextPubSubConnection()
public void returnPubSubConnection(PubSubConnectionEntry entry)
public void releaseWrite(RedisConnection connection)
public void releaseRead(RedisConnection connection)
public void incReference()
public int decReference()
public int getReferences()
Copyright © 2014–2020 Redisson. All rights reserved.