Class AbstractRedisConnection
java.lang.Object
org.springframework.data.redis.connection.AbstractRedisConnection
- All Implemented Interfaces:
AutoCloseable, DefaultedRedisConnection, RedisCommands, RedisCommandsProvider, RedisConnection, RedisConnectionCommands, RedisGeoCommands, RedisHashCommands, RedisHyperLogLogCommands, RedisKeyCommands, RedisListCommands, RedisPubSubCommands, RedisScriptingCommands, RedisServerCommands, RedisSetCommands, RedisStreamCommands, RedisStringCommands, RedisTxCommands, RedisZSetCommands
- Direct Known Subclasses:
JedisConnection, LettuceConnection
- Since:
- 1.4
- Author:
- Christoph Strobl, Mark Paluch
-
Nested Class Summary
Nested classes/interfaces inherited from interface RedisGeoCommands
RedisGeoCommands.DistanceUnit, RedisGeoCommands.GeoCommandArgs, RedisGeoCommands.GeoLocation<T>, RedisGeoCommands.GeoRadiusCommandArgs, RedisGeoCommands.GeoSearchCommandArgs, RedisGeoCommands.GeoSearchStoreCommandArgsNested classes/interfaces inherited from interface RedisHashCommands
RedisHashCommands.HashFieldSetOptionNested classes/interfaces inherited from interface RedisListCommands
RedisListCommands.Direction, RedisListCommands.PositionNested classes/interfaces inherited from interface RedisServerCommands
RedisServerCommands.FlushOption, RedisServerCommands.MigrateOption, RedisServerCommands.ShutdownOptionNested classes/interfaces inherited from interface RedisStreamCommands
RedisStreamCommands.XAddOptions, RedisStreamCommands.XClaimOptions, RedisStreamCommands.XPendingOptionsNested classes/interfaces inherited from interface RedisStringCommands
RedisStringCommands.BitOperation, RedisStringCommands.SetOptionNested classes/interfaces inherited from interface RedisZSetCommands
RedisZSetCommands.Limit, RedisZSetCommands.Range, RedisZSetCommands.ZAddArgs -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes or quits the connection.protected RedisSentinelConnectiongetSentinelConnection(RedisNode sentinel) GetRedisSentinelCommandsconnected to given node.booleanprotected booleanCheck if node is active by sending ping.voidsetSentinelConfiguration(RedisSentinelConfiguration sentinelConfiguration) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DefaultedRedisConnection
append, applyHashFieldExpiration, bgReWriteAof, bgSave, bitCount, bitCount, bitField, bitOp, bitPos, bLMove, bLPop, bRPop, bRPopLPush, bZPopMax, bZPopMin, copy, dbSize, decr, decrBy, del, dump, encodingOf, eval, evalSha, evalSha, exists, exists, expire, expire, expireAt, expireAt, flushAll, flushAll, flushDb, flushDb, geoAdd, geoAdd, geoAdd, geoDist, geoDist, geoHash, geoPos, geoRadius, geoRadius, geoRadiusByMember, geoRadiusByMember, geoRemove, geoSearch, geoSearchStore, get, getBit, getClientList, getClientName, getConfig, getDel, getEx, getRange, getSet, hDel, hExists, hExpire, hExpire, hExpireAt, hExpireAt, hGet, hGetAll, hGetDel, hGetEx, hIncrBy, hIncrBy, hKeys, hLen, hMGet, hMSet, hPersist, hpExpire, hpExpire, hpExpireAt, hpExpireAt, hpTtl, hRandField, hRandField, hRandFieldWithValues, hRandFieldWithValues, hScan, hSet, hSetEx, hSetNX, hStrLen, hTtl, hTtl, hVals, idletime, incr, incrBy, incrBy, info, info, keys, killClient, lastSave, lIndex, lInsert, lLen, lMove, lPop, lPop, lPos, lPush, lPushX, lRange, lRem, lSet, lTrim, mGet, migrate, migrate, move, mSet, mSetNX, persist, pExpire, pExpire, pExpireAt, pExpireAt, pfAdd, pfCount, pfMerge, pSetEx, pTtl, pTtl, randomKey, refcount, rename, renameNX, replicaOf, replicaOfNoOne, resetConfigStats, restore, rewriteConfig, rPop, rPop, rPopLPush, rPush, rPushX, sAdd, save, scan, sCard, scriptExists, scriptFlush, scriptKill, scriptLoad, sDiff, sDiffStore, set, set, setBit, setClientName, setConfig, setEx, setGet, setNX, setRange, shutdown, shutdown, sInter, sInterCard, sInterStore, sIsMember, sMembers, sMIsMember, sMove, sort, sort, sPop, sPop, sRandMember, sRandMember, sRem, sScan, strLen, sUnion, sUnionStore, time, 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, xTrim, 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, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScoreWithScores, zRangeStoreByLex, zRangeStoreByScore, zRangeStoreRevByLex, zRangeStoreRevByScore, zRangeWithScores, zRank, zRem, zRemRange, zRemRangeByLex, zRemRangeByScore, zRemRangeByScore, zRevRange, zRevRangeByLex, zRevRangeByScore, zRevRangeByScoreWithScores, zRevRangeWithScores, zRevRank, zScan, zScore, zUnion, zUnionStore, zUnionStore, zUnionStore, zUnionWithScores, zUnionWithScores, zUnionWithScoresMethods inherited from interface RedisCommands
executeMethods inherited from interface RedisCommandsProvider
commands, geoCommands, hashCommands, hyperLogLogCommands, keyCommands, listCommands, scriptingCommands, serverCommands, setCommands, streamCommands, stringCommands, zSetCommandsMethods inherited from interface RedisConnection
closePipeline, getNativeConnection, isClosed, isPipelined, isQueueing, openPipelineMethods inherited from interface RedisConnectionCommands
echo, ping, selectMethods inherited from interface RedisGeoCommands
geoAdd, geoRadiusByMemberMethods inherited from interface RedisHashCommands
applyHashFieldExpiration, hExpire, hpExpireMethods inherited from interface RedisKeyCommands
applyExpiration, expire, expireAt, pExpire, pExpireAt, restore, scanMethods inherited from interface RedisListCommands
lPosMethods inherited from interface RedisPubSubCommands
getSubscription, isSubscribed, pSubscribe, publish, subscribeMethods inherited from interface RedisStreamCommands
xAck, xAdd, xAdd, xClaim, xDel, xGroupDelConsumer, xPending, xPending, xPending, xPending, xPending, xPending, xPending, xPendingMethods inherited from interface RedisStringCommands
bitPosMethods inherited from interface RedisZSetCommands
zAdd, zAdd, zRangeByLex, zRangeByLex, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeStoreByLex, zRangeStoreByScore, zRangeStoreRevByLex, zRangeStoreRevByScore, zRevRangeByLex, zRevRangeByLex, zRevRangeByScore, zRevRangeByScore, zRevRangeByScore, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores
-
Constructor Details
-
AbstractRedisConnection
public AbstractRedisConnection()
-
-
Method Details
-
getSentinelConnection
- Specified by:
getSentinelConnectionin interfaceRedisConnection- Returns:
- the
RedisSentinelConnectionwhen using Redis Sentinel.
-
setSentinelConfiguration
-
hasRedisSentinelConfigured
public boolean hasRedisSentinelConfigured() -
isActive
Check if node is active by sending ping.- Parameters:
node-- Returns:
-
getSentinelConnection
GetRedisSentinelCommandsconnected to given node.- Parameters:
sentinel-- Returns:
-
close
Description copied from interface:RedisConnectionCloses or quits the connection.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRedisConnection- Throws:
DataAccessException- if theRedisConnectioncould not be closed.
-