SingleEntry
public class MasterSlaveEntry extends Object
Constructor | Description |
---|---|
MasterSlaveEntry(ConnectionManager connectionManager,
MasterSlaveServersConfig config) |
public MasterSlaveEntry(ConnectionManager connectionManager, MasterSlaveServersConfig config)
public MasterSlaveServersConfig getConfig()
public List<RFuture<Void>> initSlaveBalancer(Collection<URI> disconnectedNodes)
public RFuture<RedisClient> setupMasterEntry(InetSocketAddress address, URI uri)
public RFuture<RedisClient> setupMasterEntry(URI address)
public boolean slaveDown(ClientConnectionsEntry entry, ClientConnectionsEntry.FreezeReason freezeReason)
public boolean slaveDown(InetSocketAddress address, ClientConnectionsEntry.FreezeReason freezeReason)
public boolean slaveDown(URI address, ClientConnectionsEntry.FreezeReason freezeReason)
public boolean hasSlave(RedisClient redisClient)
public boolean hasSlave(InetSocketAddress addr)
public boolean hasSlave(URI addr)
public int getAvailableClients()
public RFuture<Void> addSlave(InetSocketAddress address, URI uri)
public Collection<ClientConnectionsEntry> getAllEntries()
public RedisClient getClient()
public boolean slaveUp(ClientConnectionsEntry entry, ClientConnectionsEntry.FreezeReason freezeReason)
public boolean isSlaveUnfreezed(URI address)
public boolean slaveUp(URI address, ClientConnectionsEntry.FreezeReason freezeReason)
public boolean slaveUp(InetSocketAddress address, ClientConnectionsEntry.FreezeReason freezeReason)
public RFuture<RedisClient> changeMaster(URI 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, URI uri)
public RFuture<RedisConnection> connectionWriteOp(RedisCommand<?> command)
public RFuture<RedisConnection> connectionReadOp(RedisCommand<?> command)
public RFuture<RedisConnection> connectionReadOp(RedisCommand<?> command, URI 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–2018 The Redisson Project. All rights reserved.