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.RedisStringCommands.BitOperation, RedisStringCommands.SetOptionRedisListCommands.PositionRedisZSetCommands.Aggregate, RedisZSetCommands.Limit, RedisZSetCommands.Range, RedisZSetCommands.Tuple, RedisZSetCommands.WeightsRedisServerCommands.MigrateOption, RedisServerCommands.ShutdownOptionRedisStreamCommands.XAddOptions, RedisStreamCommands.XClaimOptions, RedisStreamCommands.XPendingOptionsRedisGeoCommands.DistanceUnit, RedisGeoCommands.GeoLocation<T>, RedisGeoCommands.GeoRadiusCommandArgsRedisClusterCommands.AddSlots| Modifier and Type | Method and Description |
|---|---|
<T> T |
execute(String command,
byte[] key,
Collection<byte[]> args)
Execute the given command for the
key provided potentially appending args. |
Set<byte[]> |
keys(RedisClusterNode node,
byte[] pattern) |
String |
ping(RedisClusterNode node) |
byte[] |
randomKey(RedisClusterNode node) |
Cursor<byte[]> |
scan(RedisClusterNode node,
ScanOptions options)
Use a
Cursor to iterate over keys. |
default RedisClusterServerCommands |
serverCommands()
|
close, closePipeline, geoCommands, getNativeConnection, getSentinelConnection, hashCommands, hyperLogLogCommands, isClosed, isPipelined, isQueueing, keyCommands, listCommands, openPipeline, scriptingCommands, setCommands, streamCommands, stringCommands, zSetCommandsexecutedel, dump, encodingOf, exists, exists, expire, expireAt, idletime, keys, move, persist, pExpire, pExpireAt, pTtl, pTtl, randomKey, refcount, rename, renameNX, restore, restore, scan, sort, sort, touch, ttl, ttl, type, unlinkappend, bitCount, bitCount, bitField, bitOp, bitPos, bitPos, decr, decrBy, get, getBit, getRange, getSet, incr, incrBy, incrBy, mGet, mSet, mSetNX, pSetEx, set, set, setBit, setEx, setNX, setRange, strLenbLPop, bRPop, bRPopLPush, lIndex, lInsert, lLen, lPop, lPos, lPos, lPush, lPushX, lRange, lRem, lSet, lTrim, rPop, rPopLPush, rPush, rPushXsAdd, sCard, sDiff, sDiffStore, sInter, sInterStore, sIsMember, sMembers, sMove, sPop, sPop, sRandMember, sRandMember, sRem, sScan, sUnion, sUnionStorezAdd, zAdd, zCard, zCount, zCount, zIncrBy, zInterStore, zInterStore, zInterStore, zLexCount, zRange, zRangeByLex, zRangeByLex, zRangeByLex, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeWithScores, zRank, zRem, zRemRange, zRemRangeByScore, zRemRangeByScore, zRevRange, zRevRangeByLex, zRevRangeByLex, zRevRangeByLex, zRevRangeByScore, zRevRangeByScore, zRevRangeByScore, zRevRangeByScore, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeWithScores, zRevRank, zScan, zScore, zUnionStore, zUnionStore, zUnionStorehDel, hExists, hGet, hGetAll, hIncrBy, hIncrBy, hKeys, hLen, hMGet, hMSet, hScan, hSet, hSetNX, hStrLen, hValsdiscard, exec, multi, unwatch, watchgetSubscription, isSubscribed, pSubscribe, publish, subscribeecho, ping, selectbgReWriteAof, bgSave, bgWriteAof, dbSize, flushAll, flushDb, getClientList, getClientName, getConfig, info, info, killClient, lastSave, migrate, migrate, resetConfigStats, save, setClientName, setConfig, shutdown, shutdown, slaveOf, slaveOfNoOne, timexAck, 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, xTrimeval, evalSha, evalSha, scriptExists, scriptFlush, scriptKill, scriptLoadgeoAdd, geoAdd, geoAdd, geoAdd, geoDist, geoDist, geoHash, geoPos, geoRadius, geoRadius, geoRadiusByMember, geoRadiusByMember, geoRadiusByMember, geoRemovepfAdd, pfCount, pfMergeclusterAddSlots, clusterAddSlots, clusterCountKeysInSlot, clusterDeleteSlots, clusterDeleteSlotsInRange, clusterForget, clusterGetClusterInfo, clusterGetKeysInSlot, clusterGetMasterSlaveMap, clusterGetNodeForKey, clusterGetNodeForSlot, clusterGetNodes, clusterGetSlaves, clusterGetSlotForKey, clusterMeet, clusterReplicate, clusterSetSlotbgReWriteAof, bgSave, dbSize, flushAll, flushDb, getClientList, getConfig, info, info, lastSave, resetConfigStats, save, setConfig, shutdown, time@Nullable String ping(RedisClusterNode node)
node - must not be null.RedisConnectionCommands.ping()@Nullable Set<byte[]> keys(RedisClusterNode node, byte[] pattern)
node - must not be null.pattern - must not be null.RedisKeyCommands.keys(byte[])Cursor<byte[]> scan(RedisClusterNode node, ScanOptions options)
Cursor to iterate over keys.node - must not be null.options - must not be null.@Nullable byte[] randomKey(RedisClusterNode node)
node - must not be null.RedisKeyCommands.randomKey()@Nullable <T> T execute(String command, byte[] key, Collection<byte[]> args)
key provided potentially appending args. #execute(String, byte[]...), dispatches the command to the key serving
master node.
// SET foo bar EX 10 NX
execute("SET", "foo".getBytes(), asBinaryList("bar", "EX", 10, "NX"))
command - must not be null.key - must not be null.args - must not be null.default RedisClusterServerCommands serverCommands()
serverCommands in interface RedisConnectionCopyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.