public class LettuceClusterConnection extends LettuceConnection implements DefaultedRedisClusterConnection
RedisClusterConnection implementation on top of Lettuce
Redis client.| 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. |
LettuceConnection.PipeliningFlushPolicy, LettuceConnection.PipeliningFlushStateRedisClusterCommands.AddSlotsRedisStringCommands.BitOperation, RedisStringCommands.SetOptionRedisListCommands.PositionRedisZSetCommands.Aggregate, RedisZSetCommands.Limit, RedisZSetCommands.Range, RedisZSetCommands.Tuple, RedisZSetCommands.WeightsRedisStreamCommands.XAddOptions, RedisStreamCommands.XClaimOptions, RedisStreamCommands.XPendingOptionsRedisGeoCommands.DistanceUnit, RedisGeoCommands.GeoLocation<T>, RedisGeoCommands.GeoRadiusCommandArgs| Modifier | Constructor and Description |
|---|---|
|
LettuceClusterConnection(LettuceConnectionProvider connectionProvider)
Creates new
LettuceClusterConnection using LettuceConnectionProvider running commands across the
cluster via given ClusterCommandExecutor. |
|
LettuceClusterConnection(LettuceConnectionProvider connectionProvider,
ClusterCommandExecutor executor)
Creates new
LettuceClusterConnection using LettuceConnectionProvider running commands across the
cluster via given ClusterCommandExecutor. |
|
LettuceClusterConnection(LettuceConnectionProvider connectionProvider,
ClusterCommandExecutor executor,
Duration timeout)
Creates new
LettuceClusterConnection using LettuceConnectionProvider running commands across the
cluster via given ClusterCommandExecutor. |
|
LettuceClusterConnection(io.lettuce.core.cluster.RedisClusterClient clusterClient)
Creates new
LettuceClusterConnection using RedisClusterClient with default
timeout and a fresh ClusterCommandExecutor that gets destroyed on
close. |
|
LettuceClusterConnection(io.lettuce.core.cluster.RedisClusterClient clusterClient,
ClusterCommandExecutor executor)
Creates new
LettuceClusterConnection with default timeout using
RedisClusterClient running commands across the cluster via given ClusterCommandExecutor. |
|
LettuceClusterConnection(io.lettuce.core.cluster.RedisClusterClient clusterClient,
ClusterCommandExecutor executor,
Duration timeout)
Creates new
LettuceClusterConnection with given command timeout using RedisClusterClient
running commands across the cluster via given ClusterCommandExecutor. |
protected |
LettuceClusterConnection(io.lettuce.core.cluster.api.StatefulRedisClusterConnection<byte[],byte[]> sharedConnection,
LettuceConnectionProvider connectionProvider,
ClusterTopologyProvider clusterTopologyProvider,
ClusterCommandExecutor executor,
Duration timeout)
Creates new
LettuceClusterConnection given a shared StatefulRedisClusterConnection and
LettuceConnectionProvider running commands across the cluster via given ClusterCommandExecutor. |
closePipeline, convertLettuceAccessException, discard, doCreateSubscription, doGetAsyncDedicatedConnection, echo, exec, execute, execute, getAsyncDedicatedConnection, getConnection, getNativeConnection, getSentinelConnection, getSubscription, isActive, isClosed, isPipelined, isQueueing, isSubscribed, openPipeline, pSubscribe, publish, scriptingCommands, setConvertPipelineAndTxResults, setPipeliningFlushPolicy, streamCommands, subscribe, switchToPubSubgetSentinelConnection, hasRedisSentinelConfigured, setSentinelConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbgReWriteAof, bgSave, dbSize, execute, flushAll, flushDb, getClientList, getConfig, info, info, lastSave, resetConfigStats, save, setConfig, shutdown, timeappend, bgReWriteAof, bgSave, bgWriteAof, bitCount, bitCount, bitField, bitOp, bitPos, bLPop, bRPop, bRPopLPush, dbSize, decr, decrBy, del, dump, encodingOf, eval, evalSha, evalSha, exists, 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, hStrLen, hVals, idletime, 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, refcount, 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, sPop, sRandMember, sRandMember, sRem, sScan, strLen, sUnion, sUnionStore, time, touch, ttl, ttl, type, unlink, xAck, xAdd, xClaim, xClaimJustId, xDel, xGroupCreate, xGroupCreate, xGroupDelConsumer, xGroupDestroy, xInfo, xInfoConsumers, xInfoGroups, xLen, xPending, xPending, xRange, xRange, xRead, xRead, xReadGroup, xReadGroup, xRevRange, xRevRange, xTrim, zAdd, zAdd, zCard, zCount, zCount, zIncrBy, zInterStore, zInterStore, zInterStore, zRange, zRangeByLex, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScoreWithScores, zRangeWithScores, zRank, zRem, zRemRange, zRemRangeByScore, zRemRangeByScore, zRevRange, zRevRangeByScore, zRevRangeByScoreWithScores, zRevRangeWithScores, zRevRank, zScan, zScore, zUnionStore, zUnionStore, zUnionStoreclosePipeline, getNativeConnection, getSentinelConnection, isClosed, isPipelined, isQueueing, openPipeline, scriptingCommands, streamCommandsexecuterestorebitPoszRangeByLex, zRangeByLex, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeByScoreWithScores, zRevRangeByScore, zRevRangeByScore, zRevRangeByScore, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeByScoreWithScoresdiscard, execgetSubscription, isSubscribed, pSubscribe, publish, subscribeechoxAck, xAdd, xAdd, xClaim, xDel, xGroupDelConsumer, xPending, xPending, xPending, xPending, xPendinggeoAdd, geoRadiusByMemberpublic LettuceClusterConnection(io.lettuce.core.cluster.RedisClusterClient clusterClient)
LettuceClusterConnection using RedisClusterClient with default
timeout and a fresh ClusterCommandExecutor that gets destroyed on
close.clusterClient - must not be null.public LettuceClusterConnection(io.lettuce.core.cluster.RedisClusterClient clusterClient,
ClusterCommandExecutor executor)
LettuceClusterConnection with default timeout using
RedisClusterClient running commands across the cluster via given ClusterCommandExecutor.clusterClient - must not be null.executor - must not be null.public LettuceClusterConnection(io.lettuce.core.cluster.RedisClusterClient clusterClient,
ClusterCommandExecutor executor,
Duration timeout)
LettuceClusterConnection with given command timeout using RedisClusterClient
running commands across the cluster via given ClusterCommandExecutor.clusterClient - must not be null.timeout - must not be null.executor - must not be null.public LettuceClusterConnection(LettuceConnectionProvider connectionProvider)
LettuceClusterConnection using LettuceConnectionProvider running commands across the
cluster via given ClusterCommandExecutor.connectionProvider - must not be null.public LettuceClusterConnection(LettuceConnectionProvider connectionProvider, ClusterCommandExecutor executor)
LettuceClusterConnection using LettuceConnectionProvider running commands across the
cluster via given ClusterCommandExecutor.connectionProvider - must not be null.executor - must not be null.public LettuceClusterConnection(LettuceConnectionProvider connectionProvider, ClusterCommandExecutor executor, Duration timeout)
LettuceClusterConnection using LettuceConnectionProvider running commands across the
cluster via given ClusterCommandExecutor.connectionProvider - must not be null.executor - must not be null.timeout - must not be null.protected LettuceClusterConnection(@Nullable io.lettuce.core.cluster.api.StatefulRedisClusterConnection<byte[],byte[]> sharedConnection, LettuceConnectionProvider connectionProvider, ClusterTopologyProvider clusterTopologyProvider, ClusterCommandExecutor executor, Duration timeout)
LettuceClusterConnection given a shared StatefulRedisClusterConnection and
LettuceConnectionProvider running commands across the cluster via given ClusterCommandExecutor.sharedConnection - may be null if no shared connection used.connectionProvider - must not be null.clusterTopologyProvider - must not be null.executor - must not be null.timeout - 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 String ping()
RedisConnectionCommandsping in interface RedisConnectionCommandsping in class LettuceConnectionpublic String ping(RedisClusterNode node)
ping in interface RedisClusterConnectionnode - must not be null.RedisConnectionCommands.ping()public List<RedisClusterNode> clusterGetNodes()
RedisClusterCommandsclusterGetNodes in interface RedisClusterCommandspublic Set<RedisClusterNode> clusterGetSlaves(RedisClusterNode master)
RedisClusterCommandsclusterGetSlaves in interface RedisClusterCommandsmaster - must not be null.public Map<RedisClusterNode,Collection<RedisClusterNode>> clusterGetMasterSlaveMap()
RedisClusterCommandsclusterGetMasterSlaveMap in interface RedisClusterCommandspublic 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 Long clusterCountKeysInSlot(int slot)
RedisClusterCommandsclusterCountKeysInSlot in interface RedisClusterCommandspublic 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 void clusterReplicate(RedisClusterNode master, RedisClusterNode replica)
RedisClusterCommandsclusterReplicate in interface RedisClusterCommandsmaster - must not be null.replica - must not be null.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 Cursor<byte[]> scan(RedisClusterNode node, ScanOptions options)
RedisClusterConnectionCursor to iterate over keys.scan in interface RedisClusterConnectionnode - must not be null.options - must not be null.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.public 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 ClusterCommandExecutor getClusterCommandExecutor()
public void close()
throws DataAccessException
RedisConnectionclose in interface AutoCloseableclose in interface RedisConnectionclose in class LettuceConnectionDataAccessExceptionCopyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.