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.SetOption
RedisListCommands.Position
RedisZSetCommands.Aggregate, RedisZSetCommands.Limit, RedisZSetCommands.Range, RedisZSetCommands.Tuple, RedisZSetCommands.Weights
RedisServerCommands.MigrateOption, RedisServerCommands.ShutdownOption
RedisStreamCommands.XAddOptions, RedisStreamCommands.XClaimOptions, RedisStreamCommands.XPendingOptions
RedisGeoCommands.DistanceUnit, RedisGeoCommands.GeoLocation<T>, RedisGeoCommands.GeoRadiusCommandArgs
RedisClusterCommands.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, zSetCommands
execute
del, 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, unlink
append, 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, strLen
bLPop, bRPop, bRPopLPush, lIndex, lInsert, lLen, lPop, lPos, lPos, lPush, lPushX, lRange, lRem, lSet, lTrim, rPop, rPopLPush, rPush, rPushX
sAdd, sCard, sDiff, sDiffStore, sInter, sInterStore, sIsMember, sMembers, sMove, sPop, sPop, sRandMember, sRandMember, sRem, sScan, sUnion, sUnionStore
zAdd, 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, zUnionStore
hDel, hExists, hGet, hGetAll, hIncrBy, hIncrBy, hKeys, hLen, hMGet, hMSet, hScan, hSet, hSetNX, hStrLen, hVals
discard, exec, multi, unwatch, watch
getSubscription, isSubscribed, pSubscribe, publish, subscribe
echo, ping, select
bgReWriteAof, bgSave, bgWriteAof, dbSize, flushAll, flushDb, getClientList, getClientName, getConfig, info, info, killClient, lastSave, migrate, migrate, resetConfigStats, save, setClientName, setConfig, shutdown, shutdown, slaveOf, slaveOfNoOne, time
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, xTrim
eval, evalSha, evalSha, scriptExists, scriptFlush, scriptKill, scriptLoad
geoAdd, geoAdd, geoAdd, geoAdd, geoDist, geoDist, geoHash, geoPos, geoRadius, geoRadius, geoRadiusByMember, geoRadiusByMember, geoRadiusByMember, geoRemove
pfAdd, pfCount, pfMerge
clusterAddSlots, clusterAddSlots, clusterCountKeysInSlot, clusterDeleteSlots, clusterDeleteSlotsInRange, clusterForget, clusterGetClusterInfo, clusterGetKeysInSlot, clusterGetMasterSlaveMap, clusterGetNodeForKey, clusterGetNodeForSlot, clusterGetNodes, clusterGetSlaves, clusterGetSlotForKey, clusterMeet, clusterReplicate, clusterSetSlot
bgReWriteAof, 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 RedisConnection
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.