public class LettuceClusterConnection extends LettuceConnection implements DefaultedRedisClusterConnection
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
LettuceClusterConnection.LettuceClusterCommandCallback<T>
Lettuce specific implementation of
ClusterCommandExecutor.ClusterCommandCallback. |
protected static interface |
LettuceClusterConnection.LettuceMultiKeyClusterCommandCallback<T>
Lettuce specific implementation of
ClusterCommandExecutor.MultiKeyClusterCommandCallback. |
RedisClusterCommands.AddSlotsRedisStringCommands.BitOperation, RedisStringCommands.SetOptionRedisListCommands.PositionRedisZSetCommands.Aggregate, RedisZSetCommands.Limit, RedisZSetCommands.Range, RedisZSetCommands.TupleRedisGeoCommands.DistanceUnit, RedisGeoCommands.GeoLocation<T>, RedisGeoCommands.GeoRadiusCommandArgs| Constructor and Description |
|---|
LettuceClusterConnection(io.lettuce.core.cluster.RedisClusterClient clusterClient)
Creates new
LettuceClusterConnection using RedisClusterClient. |
LettuceClusterConnection(io.lettuce.core.cluster.RedisClusterClient clusterClient,
ClusterCommandExecutor executor)
Creates new
LettuceClusterConnection using RedisClusterClient running commands across the cluster
via given ClusterCommandExecutor. |
closePipeline, convertLettuceAccessException, discard, echo, exec, execute, execute, getAsyncDedicatedConnection, getConnection, getNativeConnection, getSentinelConnection, getSubscription, isActive, isClosed, isPipelined, isQueueing, isSubscribed, openPipeline, pSubscribe, publish, scriptingCommands, setConvertPipelineAndTxResults, subscribegetSentinelConnection, hasRedisSentinelConfigured, setSentinelConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbgReWriteAof, bgSave, dbSize, flushAll, flushDb, getClientList, getConfig, info, info, lastSave, resetConfigStats, save, setConfig, shutdown, timeappend, bgReWriteAof, bgSave, bgWriteAof, bitCount, bitCount, bitOp, bLPop, bRPop, bRPopLPush, dbSize, decr, decrBy, del, dump, eval, evalSha, evalSha, exists, expire, expireAt, flushAll, flushDb, geoAdd, geoAdd, geoAdd, geoDist, geoDist, geoHash, geoPos, geoRadius, geoRadius, geoRadiusByMember, geoRadiusByMember, geoRemove, get, getBit, getClientList, getClientName, getConfig, getRange, getSet, hDel, hExists, hGet, hGetAll, hIncrBy, hIncrBy, hKeys, hLen, hMGet, hMSet, hScan, hSet, hSetNX, hVals, incr, incrBy, incrBy, info, info, keys, killClient, lastSave, lIndex, lInsert, lLen, lPop, lPush, lPushX, lRange, lRem, lSet, lTrim, mGet, migrate, migrate, move, mSet, mSetNX, persist, pExpire, pExpireAt, pfAdd, pfCount, pfMerge, pSetEx, pTtl, pTtl, randomKey, rename, renameNX, resetConfigStats, restore, rPop, rPopLPush, rPush, rPushX, sAdd, save, scan, sCard, scriptExists, scriptFlush, scriptKill, scriptLoad, sDiff, sDiffStore, set, set, setBit, setClientName, setConfig, setEx, setNX, setRange, shutdown, shutdown, sInter, sInterStore, sIsMember, slaveOf, slaveOfNoOne, sMembers, sMove, sort, sort, sPop, sRandMember, sRandMember, sRem, sScan, strLen, sUnion, sUnionStore, time, ttl, ttl, type, zAdd, zAdd, zCard, zCount, zCount, zIncrBy, zInterStore, zInterStore, zRange, zRangeByLex, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScoreWithScores, zRangeWithScores, zRank, zRem, zRemRange, zRemRangeByScore, zRemRangeByScore, zRevRange, zRevRangeByScore, zRevRangeByScoreWithScores, zRevRangeWithScores, zRevRank, zScan, zScore, zUnionStore, zUnionStoreclosePipeline, getNativeConnection, getSentinelConnection, isClosed, isPipelined, isQueueing, openPipeline, scriptingCommandsexecutezRangeByLex, zRangeByLex, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeByScoreWithScores, zRevRangeByScore, zRevRangeByScore, zRevRangeByScore, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeByScoreWithScoresdiscard, execgetSubscription, isSubscribed, pSubscribe, publish, subscribeechogeoAdd, geoRadiusByMemberpublic LettuceClusterConnection(io.lettuce.core.cluster.RedisClusterClient clusterClient)
LettuceClusterConnection using RedisClusterClient.clusterClient - must not be null.public LettuceClusterConnection(io.lettuce.core.cluster.RedisClusterClient clusterClient,
ClusterCommandExecutor executor)
LettuceClusterConnection using RedisClusterClient running commands across the cluster
via given ClusterCommandExecutor.clusterClient - must not be null.executor - must not be null.public RedisGeoCommands geoCommands()
RedisConnectionRedisGeoCommands.geoCommands in interface RedisConnectiongeoCommands in class LettuceConnectionpublic RedisHashCommands hashCommands()
RedisConnectionRedisHashCommands.hashCommands in interface RedisConnectionhashCommands in class LettuceConnectionpublic RedisHyperLogLogCommands hyperLogLogCommands()
RedisConnectionhyperLogLogCommands in interface RedisConnectionhyperLogLogCommands in class LettuceConnectionpublic RedisKeyCommands keyCommands()
RedisConnectionRedisKeyCommands.keyCommands in interface RedisConnectionkeyCommands in class LettuceConnectionpublic RedisListCommands listCommands()
RedisConnectionRedisListCommands.listCommands in interface RedisConnectionlistCommands in class LettuceConnectionpublic RedisStringCommands stringCommands()
RedisConnectionRedisStringCommands.stringCommands in interface RedisConnectionstringCommands in class LettuceConnectionpublic RedisSetCommands setCommands()
RedisConnectionRedisSetCommands.setCommands in interface RedisConnectionsetCommands in class LettuceConnectionpublic RedisZSetCommands zSetCommands()
RedisConnectionRedisZSetCommands.zSetCommands in interface RedisConnectionzSetCommands in class LettuceConnectionpublic RedisClusterServerCommands serverCommands()
RedisConnectionRedisServerCommands.serverCommands in interface RedisClusterConnectionserverCommands in interface RedisConnectionserverCommands in class LettuceConnectionpublic Set<RedisClusterNode> clusterGetSlaves(RedisClusterNode master)
RedisClusterCommandsclusterGetSlaves in interface RedisClusterCommandsmaster - must not be null.public Integer clusterGetSlotForKey(byte[] key)
RedisClusterCommandskey.clusterGetSlotForKey in interface RedisClusterCommandskey - must not be null.public RedisClusterNode clusterGetNodeForSlot(int slot)
RedisClusterCommandsRedisClusterNode serving given slot.clusterGetNodeForSlot in interface RedisClusterCommandspublic RedisClusterNode clusterGetNodeForKey(byte[] key)
RedisClusterCommandsRedisClusterNode serving given key.clusterGetNodeForKey in interface RedisClusterCommandskey - must not be null.public ClusterInfo clusterGetClusterInfo()
RedisClusterCommandsclusterGetClusterInfo in interface RedisClusterCommandspublic void clusterAddSlots(RedisClusterNode node, int... slots)
RedisClusterCommandsRedisClusterNode.clusterAddSlots in interface RedisClusterCommandsnode - must not be null.public void clusterAddSlots(RedisClusterNode node, RedisClusterNode.SlotRange range)
RedisClusterCommandsRedisClusterNode.SlotRange.getSlotsArray() to given RedisClusterNode.clusterAddSlots in interface RedisClusterCommandsnode - must not be null.range - must not be null.public void clusterDeleteSlots(RedisClusterNode node, int... slots)
RedisClusterCommandsRedisClusterNode.clusterDeleteSlots in interface RedisClusterCommandsnode - must not be null.public void clusterDeleteSlotsInRange(RedisClusterNode node, RedisClusterNode.SlotRange range)
RedisClusterCommandsRedisClusterNode.SlotRange.getSlotsArray() from given RedisClusterNode.clusterDeleteSlotsInRange in interface RedisClusterCommandsnode - must not be null.range - must not be null.public void clusterForget(RedisClusterNode node)
RedisClusterCommandsclusterForget in interface RedisClusterCommandsnode - must not be null.public void clusterMeet(RedisClusterNode node)
RedisClusterCommandsclusterMeet in interface RedisClusterCommandsnode - must contain host and RedisNode.getPort() and must
not be null.public void clusterSetSlot(RedisClusterNode node, int slot, RedisClusterCommands.AddSlots mode)
clusterSetSlot in interface RedisClusterCommandsnode - must not be null.mode - must not benull.public List<byte[]> clusterGetKeysInSlot(int slot, Integer count)
RedisClusterCommandsclusterGetKeysInSlot in interface RedisClusterCommandscount - must not be null.public Long clusterCountKeysInSlot(int slot)
RedisClusterCommandsclusterCountKeysInSlot in interface RedisClusterCommandspublic void clusterReplicate(RedisClusterNode master, RedisClusterNode slave)
RedisClusterCommandsclusterReplicate in interface RedisClusterCommandsmaster - must not be null.slave - must not be null.public String ping()
RedisConnectionCommandsping in interface RedisConnectionCommandsping in class LettuceConnectionpublic String ping(RedisClusterNode node)
ping in interface RedisClusterConnectionnode - must not be null.RedisConnectionCommands.ping()public Set<byte[]> keys(RedisClusterNode node, byte[] pattern)
keys in interface RedisClusterConnectionnode - must not be null.pattern - must not be null.RedisKeyCommands.keys(byte[])public byte[] randomKey(RedisClusterNode node)
randomKey in interface RedisClusterConnectionnode - must not be null.RedisKeyCommands.randomKey()public void select(int dbIndex)
RedisConnectionCommandsdbIndex.select in interface RedisConnectionCommandsselect in class LettuceConnectiondbIndex - the database index.protected io.lettuce.core.api.StatefulConnection<byte[],byte[]> doGetAsyncDedicatedConnection()
doGetAsyncDedicatedConnection in class LettuceConnectionpublic List<RedisClusterNode> clusterGetNodes()
RedisClusterCommandsclusterGetNodes in interface RedisClusterCommandspublic void watch(byte[]... keys)
RedisTxCommandskeys for modifications during transaction started with RedisTxCommands.multi().watch in interface RedisTxCommandswatch in class LettuceConnectionkeys - must not be null.public void unwatch()
RedisTxCommands#watch(byte[]...) keys.unwatch in interface RedisTxCommandsunwatch in class LettuceConnectionpublic void multi()
RedisTxCommandsRedisTxCommands.exec() or rolled back using RedisTxCommands.discard()
multi in interface RedisTxCommandsmulti in class LettuceConnectionpublic Map<RedisClusterNode,Collection<RedisClusterNode>> clusterGetMasterSlaveMap()
RedisClusterCommandsclusterGetMasterSlaveMap in interface RedisClusterCommandspublic ClusterCommandExecutor getClusterCommandExecutor()
public void close()
throws DataAccessException
RedisConnectionclose in interface RedisConnectionclose in class LettuceConnectionDataAccessExceptionCopyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.