Interface RedisClusterConnection
- All Superinterfaces:
AutoCloseable,RedisClusterCommands,RedisClusterServerCommands,RedisCommands,RedisConnection,RedisConnectionCommands,RedisGeoCommands,RedisHashCommands,RedisHyperLogLogCommands,RedisKeyCommands,RedisListCommands,RedisPubSubCommands,RedisScriptingCommands,RedisServerCommands,RedisSetCommands,RedisStreamCommands,RedisStringCommands,RedisTxCommands,RedisZSetCommands
- All Known Subinterfaces:
DefaultedRedisClusterConnection
- All Known Implementing Classes:
JedisClusterConnection,LettuceClusterConnection
public interface RedisClusterConnection
extends RedisConnection, RedisClusterCommands, RedisClusterServerCommands
RedisClusterConnection allows sending commands to dedicated nodes within the cluster. A
RedisClusterNode can be obtained from RedisClusterCommands.clusterGetNodes() or it can be constructed using either
host and RedisNode.getPort() or the node Id.- Since:
- 1.7
- Author:
- Christoph Strobl, Mark Paluch
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisClusterCommands
RedisClusterCommands.AddSlotsNested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisGeoCommands
RedisGeoCommands.DistanceUnit, RedisGeoCommands.GeoCommandArgs, RedisGeoCommands.GeoLocation<T>, RedisGeoCommands.GeoRadiusCommandArgs, RedisGeoCommands.GeoSearchCommandArgs, RedisGeoCommands.GeoSearchStoreCommandArgsNested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisListCommands
RedisListCommands.Direction, RedisListCommands.PositionNested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisServerCommands
RedisServerCommands.MigrateOption, RedisServerCommands.ShutdownOptionNested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisStreamCommands
RedisStreamCommands.XAddOptions, RedisStreamCommands.XClaimOptions, RedisStreamCommands.XPendingOptionsNested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisStringCommands
RedisStringCommands.BitOperation, RedisStringCommands.SetOptionNested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisZSetCommands
RedisZSetCommands.Aggregate, RedisZSetCommands.Limit, RedisZSetCommands.Range, RedisZSetCommands.Tuple, RedisZSetCommands.Weights, RedisZSetCommands.ZAddArgs -
Method Summary
Modifier and TypeMethodDescription<T> Texecute(String command, byte[] key, Collection<byte[]> args) Execute the given command for thekeyprovided potentially appending args.Set<byte[]>keys(RedisClusterNode node, byte[] pattern) ping(RedisClusterNode node) byte[]randomKey(RedisClusterNode node) Cursor<byte[]>scan(RedisClusterNode node, ScanOptions options) Use aCursorto iterate over keys.default RedisClusterServerCommandsMethods inherited from interface org.springframework.data.redis.connection.RedisClusterCommands
clusterAddSlots, clusterAddSlots, clusterCountKeysInSlot, clusterDeleteSlots, clusterDeleteSlotsInRange, clusterForget, clusterGetClusterInfo, clusterGetKeysInSlot, clusterGetMasterSlaveMap, clusterGetNodeForKey, clusterGetNodeForSlot, clusterGetNodes, clusterGetSlaves, clusterGetSlotForKey, clusterMeet, clusterReplicate, clusterSetSlotMethods inherited from interface org.springframework.data.redis.connection.RedisClusterServerCommands
bgReWriteAof, bgSave, dbSize, flushAll, flushDb, getClientList, getConfig, info, info, lastSave, resetConfigStats, rewriteConfig, save, setConfig, shutdown, time, timeMethods inherited from interface org.springframework.data.redis.connection.RedisCommands
executeMethods inherited from interface org.springframework.data.redis.connection.RedisConnection
close, closePipeline, geoCommands, getNativeConnection, getSentinelConnection, hashCommands, hyperLogLogCommands, isClosed, isPipelined, isQueueing, keyCommands, listCommands, openPipeline, scriptingCommands, setCommands, streamCommands, stringCommands, zSetCommandsMethods inherited from interface org.springframework.data.redis.connection.RedisConnectionCommands
echo, ping, selectMethods inherited from interface org.springframework.data.redis.connection.RedisGeoCommands
geoAdd, geoAdd, geoAdd, geoAdd, geoDist, geoDist, geoHash, geoPos, geoRadius, geoRadius, geoRadiusByMember, geoRadiusByMember, geoRadiusByMember, geoRemove, geoSearch, geoSearchStoreMethods inherited from interface org.springframework.data.redis.connection.RedisHashCommands
hDel, hExists, hGet, hGetAll, hIncrBy, hIncrBy, hKeys, hLen, hMGet, hMSet, hRandField, hRandField, hRandFieldWithValues, hRandFieldWithValues, hScan, hSet, hSetNX, hStrLen, hValsMethods inherited from interface org.springframework.data.redis.connection.RedisHyperLogLogCommands
pfAdd, pfCount, pfMergeMethods inherited from interface org.springframework.data.redis.connection.RedisKeyCommands
copy, del, dump, encodingOf, exists, exists, expire, expireAt, idletime, keys, move, persist, pExpire, pExpireAt, pTtl, pTtl, randomKey, refcount, rename, renameNX, restore, restore, scan, scan, sort, sort, touch, ttl, ttl, type, unlinkMethods inherited from interface org.springframework.data.redis.connection.RedisListCommands
bLMove, bLPop, bRPop, bRPopLPush, lIndex, lInsert, lLen, lMove, lPop, lPop, lPos, lPos, lPush, lPushX, lRange, lRem, lSet, lTrim, rPop, rPop, rPopLPush, rPush, rPushXMethods inherited from interface org.springframework.data.redis.connection.RedisPubSubCommands
getSubscription, isSubscribed, pSubscribe, publish, subscribeMethods inherited from interface org.springframework.data.redis.connection.RedisScriptingCommands
eval, evalSha, evalSha, scriptExists, scriptFlush, scriptKill, scriptLoadMethods inherited from interface org.springframework.data.redis.connection.RedisServerCommands
bgReWriteAof, bgSave, bgWriteAof, dbSize, flushAll, flushDb, getClientList, getClientName, getConfig, info, info, killClient, lastSave, migrate, migrate, resetConfigStats, rewriteConfig, save, setClientName, setConfig, shutdown, shutdown, slaveOf, slaveOfNoOne, time, timeMethods inherited from interface org.springframework.data.redis.connection.RedisSetCommands
sAdd, sCard, sDiff, sDiffStore, sInter, sInterStore, sIsMember, sMembers, sMIsMember, sMove, sPop, sPop, sRandMember, sRandMember, sRem, sScan, sUnion, sUnionStoreMethods inherited from interface org.springframework.data.redis.connection.RedisStreamCommands
xAck, xAck, xAdd, xAdd, xAdd, xClaim, xClaim, xClaimJustId, xDel, xDel, xGroupCreate, xGroupCreate, xGroupDelConsumer, xGroupDelConsumer, xGroupDestroy, xInfo, xInfoConsumers, xInfoGroups, xLen, xPending, xPending, xPending, xPending, xPending, xPending, xPending, xRange, xRange, xRead, xRead, xReadGroup, xReadGroup, xRevRange, xRevRange, xTrim, xTrimMethods inherited from interface org.springframework.data.redis.connection.RedisStringCommands
append, bitCount, bitCount, bitField, bitOp, bitPos, bitPos, decr, decrBy, get, getBit, getDel, getEx, getRange, getSet, incr, incrBy, incrBy, mGet, mSet, mSetNX, pSetEx, set, set, setBit, setEx, setNX, setRange, strLenMethods inherited from interface org.springframework.data.redis.connection.RedisTxCommands
discard, exec, multi, unwatch, watchMethods inherited from interface org.springframework.data.redis.connection.RedisZSetCommands
bZPopMax, bZPopMin, zAdd, zAdd, zAdd, zAdd, zCard, zCount, zCount, zDiff, zDiffStore, zDiffWithScores, zIncrBy, zInter, zInterStore, zInterStore, zInterStore, zInterWithScores, zInterWithScores, zInterWithScores, zLexCount, zMScore, zPopMax, zPopMax, zPopMin, zPopMin, zRandMember, zRandMember, zRandMemberWithScore, zRandMemberWithScore, zRange, zRangeByLex, zRangeByLex, zRangeByLex, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeWithScores, zRank, zRem, zRemRange, zRemRangeByLex, zRemRangeByScore, zRemRangeByScore, zRevRange, zRevRangeByLex, zRevRangeByLex, zRevRangeByLex, zRevRangeByScore, zRevRangeByScore, zRevRangeByScore, zRevRangeByScore, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeWithScores, zRevRank, zScan, zScore, zUnion, zUnionStore, zUnionStore, zUnionStore, zUnionWithScores, zUnionWithScores, zUnionWithScores
-
Method Details
-
ping
- Parameters:
node- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
keys
- Parameters:
node- must not be null.pattern- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
scan
Use aCursorto iterate over keys.- Parameters:
node- must not be null.options- must not be null.- Returns:
- never null.
- Since:
- 2.1
- See Also:
-
randomKey
- Parameters:
node- must not be null.- Returns:
- null when no keys stored at node or when used in pipeline / transaction.
- See Also:
-
execute
Execute the given command for thekeyprovided potentially appending args.
This method, other thanRedisCommands.execute(String, byte[]...), dispatches the command to thekeyserving master node.// SET foo bar EX 10 NX execute("SET", "foo".getBytes(), asBinaryList("bar", "EX", 10, "NX"))- Parameters:
command- must not be null.key- must not be null.args- must not be null.- Returns:
- command result as delivered by the underlying Redis driver. Can be null.
- Since:
- 2.1
-
serverCommands
- Specified by:
serverCommandsin interfaceRedisConnection- Returns:
- never null.
- Since:
- 2.0
-