Class DefaultStringRedisConnection
- All Implemented Interfaces:
AutoCloseable,DecoratedRedisConnection,DefaultedRedisConnection,RedisCommands,RedisCommandsProvider,RedisConnection,RedisConnectionCommands,RedisGeoCommands,RedisHashCommands,RedisHyperLogLogCommands,RedisKeyCommands,RedisListCommands,RedisPubSubCommands,RedisScriptingCommands,RedisServerCommands,RedisSetCommands,RedisStreamCommands,RedisStringCommands,RedisTxCommands,RedisZSetCommands,StringRedisConnection
StringRedisConnection.- Author:
- Costin Leau, Jennifer Hickey, Christoph Strobl, Thomas Darimont, Mark Paluch, Ninad Divadkar, Tugdual Grall, Andrey Shlykov, dengliming, ihaohong, Dennis Neufeld, Shyngys Sapraliyev
-
Nested Class Summary
Nested 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.FlushOption, 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.Limit, RedisZSetCommands.Range, RedisZSetCommands.ZAddArgsNested classes/interfaces inherited from interface org.springframework.data.redis.connection.StringRedisConnection
StringRedisConnection.StringTuple -
Constructor Summary
ConstructorsConstructorDescriptionDefaultStringRedisConnection(RedisConnection connection) Constructs a newDefaultStringRedisConnectioninstance.DefaultStringRedisConnection(RedisConnection connection, RedisSerializer<String> serializer) Constructs a newDefaultStringRedisConnectioninstance. -
Method Summary
Modifier and TypeMethodDescriptionappend(byte[] key, byte[] value) Append avaluetokey.Append avaluetokey.voidStart an Append Only File rewrite process on server.voidbgSave()Start background saving of db on server.bitCount(byte[] key) Count the number of set bits (population counting) in value stored atkey.bitCount(byte[] key, long start, long end) Count the number of set bits (population counting) of value stored atkeybetweenstartandend.Count the number of set bits (population counting) in value stored atkey.Count the number of set bits (population counting) of value stored atkeybetweenstartandend.bitfield(String key, BitFieldSubCommands operation) Get / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored at a givenkey.bitField(byte[] key, BitFieldSubCommands subCommands) Get / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored at a givenkey.bitOp(RedisStringCommands.BitOperation op, byte[] destination, byte[]... keys) Perform bitwise operations between strings.bitOp(RedisStringCommands.BitOperation op, String destination, String... keys) Perform bitwise operations between strings.Return the position of the first bit set to givenbitin a string.Return the position of the first bit set to givenbitin a string.byte[]bLMove(byte[] sourceKey, byte[] destinationKey, RedisListCommands.Direction from, RedisListCommands.Direction to, double timeout) Atomically returns and removes the first/last element (head/tail depending on thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) of the list stored atdestinationKey.bLMove(String sourceKey, String destinationKey, RedisListCommands.Direction from, RedisListCommands.Direction to, double timeout) Atomically returns and removes the first/last element (head/tail depending on thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) of the list stored atdestinationKey.List<byte[]>bLPop(int timeout, byte[]... keys) Removes and returns first element from lists stored atkeys.Removes and returns first element from lists stored atkeys(see:DefaultedRedisConnection.lPop(byte[])).List<byte[]>bRPop(int timeout, byte[]... keys) Removes and returns last element from lists stored atkeys.Removes and returns last element from lists stored atkeys(see:DefaultedRedisConnection.rPop(byte[])).byte[]bRPopLPush(int timeout, byte[] srcKey, byte[] dstKey) Remove the last element from list atsrcKey, append it todstKeyand return its value.bRPopLPush(int timeout, String srcKey, String dstKey) Remove the last element from list atsrcKey, append it todstKeyand return its value (seeDefaultedRedisConnection.rPopLPush(byte[], byte[])).Remove and return the value with its score having the highest score from sorted set atkey.Remove and return the value with its score having the highest score from sorted set atkey.Remove and return the value with its score having the lowest score from sorted set atkey.Remove and return the value with its score having the lowest score from sorted set atkey.voidclose()Closes or quits the connection.Executes the commands in the pipeline and returns their result.commands()GetRedisCommands.copy(byte[] sourceKey, byte[] targetKey, boolean replace) Copy givensourceKeytotargetKey.Copy givensourceKeytotargetKey.dbSize()Get the total number of available keys in currently selected database.decr(byte[] key) Decrement an integer value stored as string value ofkeyby 1.Decrement an integer value stored as string value ofkeyby 1.decrBy(byte[] key, long value) Decrement an integer value stored as string value ofkeybyvalue.Decrement an integer value stored as string value ofkeybyvalue.del(byte[]... keys) Delete givenkeys.Delete givenkeys.voiddiscard()Discard all commands issued afterRedisTxCommands.multi().byte[]dump(byte[] key) Retrieve serialized version of the value stored atkey.byte[]echo(byte[] message) Returnsmessagevia server roundtrip.Returnsmessagevia server roundtrip.encodingOf(byte[] key) Get the type of internal representation used for storing the value at the givenkey.encodingOf(String key) Get the type of internal representation used for storing the value at the givenkey.<T> Teval(byte[] script, ReturnType returnType, int numKeys, byte[]... keysAndArgs) Evaluate givenscript.<T> Teval(String script, ReturnType returnType, int numKeys, String... keysAndArgs) NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same serializer used here.<T> TevalSha(byte[] scriptSha1, ReturnType returnType, int numKeys, byte[]... keysAndArgs) Evaluate givenscriptSha.<T> TevalSha(String scriptSha1, ReturnType returnType, int numKeys, byte[]... keysAndArgs) Evaluate givenscriptSha.<T> TevalSha(String scriptSha1, ReturnType returnType, int numKeys, String... keysAndArgs) NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same serializer used here.exec()Executes all queued commands in a transaction started withRedisTxCommands.multi().'Native' or 'raw' execution of the given command along-side the given arguments.Native or raw execution of the given Redis command along with the given arguments.'Native' or 'raw' execution of the given command along-side the given arguments.exists(byte[] key) Determine if givenkeyexists.exists(byte[]... keys) Count how many of the givenkeysexist.Determine if givenkeyexists.Count how many of the givenkeysexist.expire(byte[] key, long seconds) Set time to live for givenkeyin seconds.Set time to live for givenkeyin seconds.expireAt(byte[] key, long unixTime) Set the expiration for givenkeyas a UNIX timestamp.Set the expiration for givenkeyas a UNIX timestamp.voidflushAll()Delete all all keys from all databases.voidDelete all all keys from all databases using the specifiedRedisServerCommands.FlushOption.voidflushDb()Delete all keys of the currently selected database.voidDelete all keys of the currently selected database using the specifiedRedisServerCommands.FlushOption.geoAdd(byte[] key, Iterable<RedisGeoCommands.GeoLocation<byte[]>> locations) AddRedisGeoCommands.GeoLocations to keyAddPointwith given member name to key.geoAdd(byte[] key, RedisGeoCommands.GeoLocation<byte[]> location) AddRedisGeoCommands.GeoLocationto key.geoAdd(String key, Iterable<RedisGeoCommands.GeoLocation<String>> locations) AddRedisGeoCommands.GeoLocations to keyAddPointwith given member name to key.geoAdd(String key, RedisGeoCommands.GeoLocation<String> location) AddRedisGeoCommands.GeoLocationto key.GetRedisGeoCommands.geoDist(byte[] key, byte[] member1, byte[] member2) Get theDistancebetween member1 and member2.Get theDistancebetween member1 and member2.geoHash(byte[] key, byte[]... members) Get Geohash representation of the position for one or more members.Get geohash representation of the position for one or more members.geoPos(byte[] key, byte[]... members) Get thePointrepresentation of positions for one or more members.Get thePointrepresentation of positions for one or more members.GeoResults<RedisGeoCommands.GeoLocation<byte[]>>Get the members within the boundaries of a givenCircle.GeoResults<RedisGeoCommands.GeoLocation<byte[]>>geoRadius(byte[] key, Circle within, RedisGeoCommands.GeoRadiusCommandArgs args) Get the members within the boundaries of a givenCircleapplyingRedisGeoCommands.GeoRadiusCommandArgs.Get the members within the boundaries of a givenCircle.geoRadius(String key, Circle within, RedisGeoCommands.GeoRadiusCommandArgs args) Get the members within the boundaries of a givenCircleapplyingRedisGeoCommands.GeoRadiusCommandArgs.GeoResults<RedisGeoCommands.GeoLocation<byte[]>>geoRadiusByMember(byte[] key, byte[] member, double radius) Get the members within the circle defined by the members coordinates and given radius.GeoResults<RedisGeoCommands.GeoLocation<byte[]>>geoRadiusByMember(byte[] key, byte[] member, Distance radius) Get the members within the circle defined by the members coordinates and givenDistance.GeoResults<RedisGeoCommands.GeoLocation<byte[]>>geoRadiusByMember(byte[] key, byte[] member, Distance radius, RedisGeoCommands.GeoRadiusCommandArgs args) Get the members within the circle defined by the members coordinates, givenDistanceandRedisGeoCommands.GeoRadiusCommandArgs.geoRadiusByMember(String key, String member, double radius) Get the members within the circle defined by the members coordinates and given radius.geoRadiusByMember(String key, String member, Distance radius) Get the members within the circle defined by the members coordinates and givenDistance.geoRadiusByMember(String key, String member, Distance radius, RedisGeoCommands.GeoRadiusCommandArgs args) Get the members within the circle defined by the members coordinates and givenDistanceandRedisGeoCommands.GeoRadiusCommandArgs.geoRemove(byte[] key, byte[]... members) Remove the members.Remove the members.GeoResults<RedisGeoCommands.GeoLocation<byte[]>>geoSearch(byte[] key, GeoReference<byte[]> reference, GeoShape predicate, RedisGeoCommands.GeoSearchCommandArgs args) Return the members of a geo set which are within the borders of the area specified by a givenshape.geoSearch(String key, GeoReference<String> reference, GeoShape predicate, RedisGeoCommands.GeoSearchCommandArgs args) Return the members of a geo set which are within the borders of the area specified by a givenshape.geoSearchStore(byte[] destKey, byte[] key, GeoReference<byte[]> reference, GeoShape predicate, RedisGeoCommands.GeoSearchStoreCommandArgs args) Query the members of a geo set which are within the borders of the area specified by a givenshapeand store the result atdestKey.geoSearchStore(String destKey, String key, GeoReference<String> reference, GeoShape predicate, RedisGeoCommands.GeoSearchStoreCommandArgs args) Query the members of a geo set which are within the borders of the area specified by a givenshapeand store the result atdestKey.byte[]get(byte[] key) Get the value ofkey.Get the value ofkey.getBit(byte[] key, long offset) Get the bit value atoffsetof value atkey.Get the bit value atoffsetof value atkey.Request information and statistics about connected clients.Returns the name of the current connection.Load configuration parameters for givenpatternfrom server.byte[]getDel(byte[] key) Return the value atkeyand delete the key.Return the value atkeyand delete the key.Gets the underlyingRedisConnection.byte[]getEx(byte[] key, Expiration expiration) Return the value atkeyand expire the key by applyingExpiration.getEx(String key, Expiration expiration) Return the value atkeyand expire the key by applyingExpiration.Returns the native connection (the underlying library/driver object).byte[]getRange(byte[] key, long start, long end) Get a substring of value ofkeybetweenstartandend.Get a substring of value ofkeybetweenstartandend.byte[]getSet(byte[] key, byte[] value) Setvalueofkeyand return its old value.Setvalueofkeyand return its old value.Returns the current subscription for this connection or null if the connection is not subscribed.GetRedisHashCommands.hDel(byte[] key, byte[]... fields) Delete given hashfields.Delete given hashfields.hExists(byte[] key, byte[] field) Determine if given hashfieldexists.Determine if given hashfieldexists.byte[]hGet(byte[] key, byte[] field) Get value for givenfieldfrom hash atkey.Get value for givenfieldfrom hash atkey.Map<byte[],byte[]> hGetAll(byte[] key) Get entire hash stored atkey.Get entire hash stored atkey.hIncrBy(byte[] key, byte[] field, double delta) Incrementvalueof a hashfieldby the givendelta.hIncrBy(byte[] key, byte[] field, long delta) Incrementvalueof a hashfieldby the givendelta.Incrementvalueof a hashfieldby the givendelta.Incrementvalueof a hashfieldby the givendelta.Set<byte[]>hKeys(byte[] key) Get key set (fields) of hash atkey.Get key set (fields) of hash atkey.hLen(byte[] key) Get size of hash atkey.Get size of hash atkey.List<byte[]>hMGet(byte[] key, byte[]... fields) Get values for givenfieldsfrom hash atkey.Get values for givenfieldsfrom hash atkey.voidSet multiple hash fields to multiple values using data provided inhashesvoidSet multiple hash fields to multiple values using data provided inhashesbyte[]hRandField(byte[] key) Return a random field from the hash stored atkey.List<byte[]>hRandField(byte[] key, long count) Return a random field from the hash stored atkey.hRandField(String key) Return a random field from the hash stored atkey.hRandField(String key, long count) Return a random field from the hash stored atkey.Map.Entry<byte[],byte[]> hRandFieldWithValues(byte[] key) Return a random field from the hash along with its value stored atkey.hRandFieldWithValues(byte[] key, long count) Return a random field from the hash along with its value stored atkey.Return a random field from the hash along with its value stored atkey.hRandFieldWithValues(String key, long count) Return a random field from the hash along with its value stored atkey.hScan(byte[] key, ScanOptions options) Use aCursorto iterate over entries in hash atkey.hScan(String key, ScanOptions options) Use aCursorto iterate over entries in hash atkey.hSet(byte[] key, byte[] field, byte[] value) Set thevalueof a hashfield.Set thevalueof a hashfield.hSetNX(byte[] key, byte[] field, byte[] value) Set thevalueof a hashfieldonly iffielddoes not exist.Set thevalueof a hashfieldonly iffielddoes not exist.hStrLen(byte[] key, byte[] field) Returns the length of the value associated withfieldin the hash stored atkey.Returns the length of the value associated withfieldin the hash stored atkey.List<byte[]>hVals(byte[] key) Get entry set (values) of hash atfield.Get entry set (values) of hash atfield.idletime(byte[] key) Get theDurationsince the object stored at the givenkeyis idle.Get theDurationsince the object stored at the givenkeyis idle.incr(byte[] key) Increment an integer value stored as string value ofkeyby 1.Increment an integer value stored as string value ofkeyby 1.incrBy(byte[] key, double value) Increment a floating point number value ofkeybydelta.incrBy(byte[] key, long value) Increment an integer value stored ofkeybydelta.Increment a floating point number value ofkeybydelta.Increment an integer value stored ofkeybydelta.info()Load default server information like memory cpu utilization replicationLoad server information for givenselection.booleanisClosed()Indicates whether the underlying connection is closed or not.booleanIndicates whether the connection is currently pipelined or not.booleanIndicates whether the connection is in "queue"(or "MULTI") mode or not.booleanIndicates whether the current connection is subscribed (to at least one channel) or not.GetRedisKeyCommands.Set<byte[]>keys(byte[] pattern) Find all keys matching the givenpattern.Find all keys matching the givenpattern.voidkillClient(String host, int port) Closes a given client connection identified by host:port.lastSave()Get time of lastRedisServerCommands.bgSave()operation in seconds.byte[]lIndex(byte[] key, long index) Get element atindexform list atkey.Get element atindexform list atkey.lInsert(byte[] key, RedisListCommands.Position where, byte[] pivot, byte[] value) InsertvalueRedisListCommands.Position.BEFOREorRedisListCommands.Position.AFTERexistingpivotforkey.lInsert(String key, RedisListCommands.Position where, String pivot, String value) InsertvalueRedisListCommands.Position.BEFOREorRedisListCommands.Position.AFTERexistingpivotforkey.GetRedisListCommands.lLen(byte[] key) Get the size of list stored atkey.Get the size of list stored atkey.byte[]lMove(byte[] sourceKey, byte[] destinationKey, RedisListCommands.Direction from, RedisListCommands.Direction to) Atomically returns and removes the first/last element (head/tail depending on thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) of the list stored atdestinationKey.lMove(String sourceKey, String destinationKey, RedisListCommands.Direction from, RedisListCommands.Direction to) Atomically returns and removes the first/last element (head/tail depending on thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) of the list stored atdestinationKey.byte[]lPop(byte[] key) Removes and returns first element in list stored atkey.List<byte[]>lPop(byte[] key, long count) Removes and returns first elements in list stored atkey.Removes and returns first element in list stored atkey.Removes and returns first elements in list stored atkey.Returns the index of matching elements inside the list stored at given key.Returns the index of matching elements inside the list stored at given key.lPush(byte[] key, byte[]... values) Prependvaluestokey.Prependvaluestokey.lPushX(byte[] key, byte[] value) Prependvaluestokeyonly if the list exists.Prependvaluestokeyonly if the list exists.List<byte[]>lRange(byte[] key, long start, long end) Get elements betweenstartandendfrom list atkey.Get elements betweenstartandendfrom list atkey.lRem(byte[] key, long count, byte[] value) Removes the firstcountoccurrences ofvaluefrom the list stored atkey.Removes the firstcountoccurrences ofvaluefrom the list stored atkey.voidlSet(byte[] key, long index, byte[] value) Set thevaluelist element atindex.voidSet thevaluelist element atindex.voidlTrim(byte[] key, long start, long end) Trim list atkeyto elements betweenstartandend.voidTrim list atkeyto elements betweenstartandend.List<byte[]>mGet(byte[]... keys) Get multiplekeys.Get multiplekeys.voidmigrate(byte[] key, RedisNode target, int dbIndex, RedisServerCommands.MigrateOption option) Atomically transfer a key from a source Redis instance to a destination Redis instance.voidmigrate(byte[] key, RedisNode target, int dbIndex, RedisServerCommands.MigrateOption option, long timeout) Atomically transfer a key from a source Redis instance to a destination Redis instance.move(byte[] key, int dbIndex) Move givenkeyto database withindex.Move givenkeyto database withindex.Set multiple keys to multiple values using key-value pairs provided intuple.Set multiple keys to multiple values using key-value pairs provided intupleonly if the provided key does not exist.mSetNXString(Map<String, String> tuple) Set multiple keys to multiple values using key-value pairs provided intupleonly if the provided key does not exist.mSetString(Map<String, String> tuple) Set multiple keys to multiple values using key-value pairs provided intuple.voidmulti()Mark the start of a transaction block.voidActivates the pipeline mode for this connection.persist(byte[] key) Remove the expiration from givenkey.Remove the expiration from givenkey.pExpire(byte[] key, long millis) Set time to live for givenkeyin milliseconds.Set time to live for givenkeyin milliseconds.pExpireAt(byte[] key, long unixTimeInMillis) Set the expiration for givenkeyas a UNIX timestamp in milliseconds.Set the expiration for givenkeyas a UNIX timestamp in milliseconds.pfAdd(byte[] key, byte[]... values) Adds given values to the HyperLogLog stored at given key.Adds given values to the HyperLogLog stored at given key.pfCount(byte[]... keys) Return the approximated cardinality of the structures observed by the HyperLogLog at key(s).Return the approximated cardinality of the structures observed by the HyperLogLog at key(s).voidpfMerge(byte[] destinationKey, byte[]... sourceKeys) Merge N different HyperLogLogs at sourceKeys into a single destinationKey.voidMerge N different HyperLogLogs at sourceKeys into a single destinationKey.ping()Test connection.pSetEx(byte[] key, long milliseconds, byte[] value) Set thevalueand expiration inmillisecondsforkey.Set thevalueand expiration inmillisecondsforkey.voidpSubscribe(MessageListener listener, byte[]... patterns) Subscribes the connection to all channels matching the given patterns.voidpSubscribe(MessageListener listener, String... patterns) Subscribes the connection to all channels matching the given patterns.pTtl(byte[] key) Get the precise time to live forkeyin milliseconds.Get the precise time to live forkeyin and convert it to the givenTimeUnit.Get the precise time to live forkeyin milliseconds.Get the precise time to live forkeyin and convert it to the givenTimeUnit.publish(byte[] channel, byte[] message) Publishes the given message to the given channel.Publishes the given message to the given channel.byte[]Return a random key from the keyspace.refcount(byte[] key) Get the number of references of the value associated with the specifiedkey.Get the number of references of the value associated with the specifiedkey.voidrename(byte[] oldKey, byte[] newKey) Rename keyoldKeytonewKey.voidRename keyoldKeytonewKey.renameNX(byte[] oldKey, byte[] newKey) Rename keyoldKeytonewKeyonly ifnewKeydoes not exist.Rename keyoldKeytonewKeyonly ifnewKeydoes not exist.voidChange redis replication setting to new master.voidChange server into master.voidReset statistic counters on server.voidrestore(byte[] key, long ttlInMillis, byte[] serializedValue, boolean replace) voidRewrites theredis.conffile.byte[]rPop(byte[] key) Removes and returns last element in list stored atkey.List<byte[]>rPop(byte[] key, long count) Removes and returns last elements in list stored atkey.Removes and returns last element in list stored atkey.Removes and returns last elements in list stored atkey.byte[]rPopLPush(byte[] srcKey, byte[] dstKey) Remove the last element from list atsrcKey, append it todstKeyand return its value.Remove the last element from list atsrcKey, append it todstKeyand return its value.rPush(byte[] key, byte[]... values) Appendvaluestokey.Appendvaluestokey.rPushX(byte[] key, byte[] value) Appendvaluestokeyonly if the list exists.Appendvaluestokeyonly if the list exists.sAdd(byte[] key, byte[]... values) Add givenvaluesto set atkey.Add givenvaluesto set atkey.voidsave()Synchronous save current db snapshot on server.Cursor<byte[]>scan(ScanOptions options) Use aCursorto iterate over keys.sCard(byte[] key) Get size of set atkey.Get size of set atkey.scriptExists(String... scriptSha1) Check if givenscriptShasexist in script cache.voidFlush lua script cache.voidKill current lua script execution.scriptLoad(byte[] script) Load lua script into scripts cache, without executing it.
Execute the script by callingRedisScriptingCommands.evalSha(byte[], ReturnType, int, byte[]...).scriptLoad(String script) Load lua script into scripts cache, without executing it.
Execute the script by callingDefaultedRedisConnection.evalSha(byte[], ReturnType, int, byte[]...).Set<byte[]>sDiff(byte[]... keys) Diff all sets for givenkeys.Diff all sets for givenkeys.sDiffStore(byte[] destKey, byte[]... keys) Diff all sets for givenkeysand store result indestKey.sDiffStore(String destKey, String... keys) Diff all sets for givenkeysand store result indestKey.voidselect(int dbIndex) Select the DB with given positivedbIndex.GetRedisServerCommands.set(byte[] key, byte[] value) Setvalueforkey.set(byte[] key, byte[] value, Expiration expiration, RedisStringCommands.SetOption option) Setvalueforkeyapplying timeouts fromexpirationif set and inserting/updating values depending onoption.Setvalueforkey.set(String key, String value, Expiration expiration, RedisStringCommands.SetOption option) Setvalueforkeyapplying timeouts fromexpirationif set and inserting/updating values depending onoption.setBit(byte[] key, long offset, boolean value) Sets the bit atoffsetin value stored atkey.Sets the bit atoffsetin value stored atkey.voidsetClientName(byte[] name) Assign given name to current connection.voidsetClientName(String name) Assign given name to current connection.GetRedisSetCommands.voidSet server configuration forparamtovalue.voidsetDeserializePipelineAndTxResults(boolean deserializePipelineAndTxResults) Specifies if pipelined and tx results should be deserialized to Strings.setEx(byte[] key, long seconds, byte[] value) Set thevalueand expiration insecondsforkey.Set thevalueand expiration insecondsforkey.setNX(byte[] key, byte[] value) Setvalueforkey, only ifkeydoes not exist.Setvalueforkey, only ifkeydoes not exist.voidsetRange(byte[] key, byte[] value, long start) Overwrite parts ofkeystarting at the specifiedoffsetwith givenvalue.voidOverwrite parts ofkeystarting at the specifiedoffsetwith givenvalue.voidshutdown()Shutdown server.voidShutdown server.Set<byte[]>sInter(byte[]... keys) Returns the members intersecting all given sets atkeys.Returns the members intersecting all given sets atkeys.sInterStore(byte[] destKey, byte[]... keys) Intersect all given sets atkeysand store result indestKey.sInterStore(String destKey, String... keys) Intersect all given sets atkeysand store result indestKey.sIsMember(byte[] key, byte[] value) Check if set atkeycontainsvalue.Check if set atkeycontainsvalue.Set<byte[]>sMembers(byte[] key) Get all elements of set atkey.Get all elements of set atkey.sMIsMember(byte[] key, byte[]... values) Check if set atkeycontains one or morevalues.sMIsMember(String key, String... values) Check if set atkeycontains one or morevalues.sMove(byte[] srcKey, byte[] destKey, byte[] value) MovevaluefromsrcKeytodestKeyMovevaluefromsrcKeytodestKeyList<byte[]>sort(byte[] key, SortParameters params) Sort the elements forkey.sort(byte[] key, SortParameters params, byte[] storeKey) Sort the elements forkeyand store result instoreKey.sort(String key, SortParameters params) Sort the elements forkey.sort(String key, SortParameters params, String storeKey) Sort the elements forkeyand store result instoreKey.byte[]sPop(byte[] key) Remove and return a random member from set atkey.List<byte[]>sPop(byte[] key, long count) Remove and returncountrandom members from set atkey.Remove and return a random member from set atkey.Remove and returncountrandom members from set atkey.byte[]sRandMember(byte[] key) Get random element from set atkey.List<byte[]>sRandMember(byte[] key, long count) Getcountrandom elements from set atkey.sRandMember(String key) Get random element from set atkey.sRandMember(String key, long count) Getcountrandom elements from set atkey.sRem(byte[] key, byte[]... values) Remove givenvaluesfrom set atkeyand return the number of removed elements.Remove givenvaluesfrom set atkeyand return the number of removed elements.Cursor<byte[]>sScan(byte[] key, ScanOptions options) Use aCursorto iterate over elements in set atkey.sScan(String key, ScanOptions options) Use aCursorto iterate over elements in set atkey.GetRedisStreamCommands.GetRedisStringCommands.strLen(byte[] key) Get the length of the value stored atkey.Get the length of the value stored atkey.voidsubscribe(MessageListener listener, byte[]... channels) Subscribes the connection to the given channels.voidsubscribe(MessageListener listener, String... channels) Subscribes the connection to the given channels.Set<byte[]>sUnion(byte[]... keys) Union all sets at givenkeys.Union all sets at givenkeys.sUnionStore(byte[] destKey, byte[]... keys) Union all sets at givenkeysand store result indestKey.sUnionStore(String destKey, String... keys) Union all sets at givenkeysand store result indestKey.time()Request server timestamp usingTIMEcommand inTimeUnit.MILLISECONDS.Request server timestamp usingTIMEcommand.touch(byte[]... keys) Alter the last access time of givenkey(s).Alter the last access time of givenkey(s).ttl(byte[] key) Get the time to live forkeyin seconds.Get the time to live forkeyin and convert it to the givenTimeUnit.Get the time to live forkeyin seconds.Get the time to live forkeyin and convert it to the givenTimeUnit.type(byte[] key) Determine the type stored atkey.Determine the type stored atkey.unlink(byte[]... keys) Unlink thekeysfrom the keyspace.Unlink thekeysfrom the keyspace.voidunwatch()Flushes all the previouslyRedisTxCommands.watch(byte[]...)keys.voidwatch(byte[]... keys) Watch givenkeysfor modifications during transaction started withRedisTxCommands.multi().Acknowledge one or more records, identified via their id, as processed.xAdd(MapRecord<byte[], byte[], byte[]> record, RedisStreamCommands.XAddOptions options) Append the givenrecordto the stream stored atRecord#getStream.xAdd(StringRecord record, RedisStreamCommands.XAddOptions options) Append the givenStringRecordto the stream stored atRecord.getStream().xClaim(byte[] key, String group, String newOwner, RedisStreamCommands.XClaimOptions options) Change the ownership of a pending message to the given new consumer.xClaim(String key, String group, String consumer, RedisStreamCommands.XClaimOptions options) Change the ownership of a pending message to the given new consumer.xClaimJustId(byte[] key, String group, String newOwner, RedisStreamCommands.XClaimOptions options) Change the ownership of a pending message to the given new consumer without increasing the delivered count.xClaimJustId(String key, String group, String consumer, RedisStreamCommands.XClaimOptions options) Change the ownership of a pending message to the given new consumer without increasing the delivered count.Removes the records with the given id's from the stream.xGroupCreate(byte[] key, String groupName, ReadOffset readOffset) Create a consumer group.xGroupCreate(byte[] key, String groupName, ReadOffset readOffset, boolean mkStream) Create a consumer group.xGroupCreate(String key, ReadOffset readOffset, String group) Create a consumer group.xGroupCreate(String key, ReadOffset readOffset, String group, boolean mkStream) Create a consumer group.xGroupDelConsumer(byte[] key, Consumer consumer) Delete a consumer from a consumer group.xGroupDelConsumer(String key, Consumer consumer) Delete a consumer from a consumer group.xGroupDestroy(byte[] key, String groupName) Destroy a consumer group.xGroupDestroy(String key, String group) Destroy a consumer group.xInfo(byte[] key) Obtain general information about the stream stored at the specified key.Obtain general information about the stream stored at the specified key.xInfoConsumers(byte[] key, String groupName) Obtain information about every consumer in a specific consumer group for the stream stored at the specified key.xInfoConsumers(String key, String groupName) Obtain information about every consumer in a specific consumer group for the stream stored at the specified key.xInfoGroups(byte[] key) Obtain information about consumer groups associated with the stream stored at the specified key.xInfoGroups(String key) Obtain information about consumer groups associated with the stream stored at the specified key.xLen(byte[] key) Get the length of a stream.Get the length of a stream.Obtain thePendingMessagesSummaryfor a given consumer group.xPending(byte[] key, String groupName, RedisStreamCommands.XPendingOptions options) Obtain thePendingMessagesSummaryfor a given consumer group.xPending(String key, String groupName, RedisStreamCommands.XPendingOptions options) Read records from a stream within a specificRedisZSetCommands.Rangeapplying aLimit.xRead(StreamReadOptions readOptions, StreamOffset<byte[]>... streams) Read records from one or moreStreamOffsets.xReadAsString(StreamReadOptions readOptions, StreamOffset<String>... streams) Read records from one or moreStreamOffsets.xReadGroup(Consumer consumer, StreamReadOptions readOptions, StreamOffset<byte[]>... streams) Read records from one or moreStreamOffsets using a consumer group.xReadGroupAsString(Consumer consumer, StreamReadOptions readOptions, StreamOffset<String>... streams) Read records from one or moreStreamOffsets using a consumer group.Read records from a stream within a specificRedisZSetCommands.Rangeapplying aLimitin reverse order.xTrim(byte[] key, long count) Trims the stream tocountelements.xTrim(byte[] key, long count, boolean approximateTrimming) Trims the stream tocountelements.Trims the stream tocountelements.Trims the stream tocountelements.zAdd(byte[] key, double score, byte[] value, RedisZSetCommands.ZAddArgs args) zAdd(byte[] key, Set<Tuple> tuples, RedisZSetCommands.ZAddArgs args) Addvalueto a sorted set atkey, or update itsscoreif it already exists.zAdd(String key, double score, String value, RedisZSetCommands.ZAddArgs args) zAdd(String key, Set<StringRedisConnection.StringTuple> tuples) Addtuplesto a sorted set atkey, or update itsscoreif it already exists.zAdd(String key, Set<StringRedisConnection.StringTuple> tuples, RedisZSetCommands.ZAddArgs args) zCard(byte[] key) Get the size of sorted set withkey.Get the size of sorted set withkey.zCount(byte[] key, double min, double max) Count number of elements within sorted set with scores betweenminandmax.Count number of elements within sorted set with scores betweenRange#minandRange#max.Count number of elements within sorted set with scores betweenminandmax.Set<byte[]>zDiff(byte[]... sets) Diff sortedsets.Diff sortedsets.zDiffStore(byte[] destKey, byte[]... sets) Diff sortedsetsand store result in destinationdestKey.zDiffStore(String destKey, String... sets) Diff sortedsetsand store result in destinationdestKey.zDiffWithScores(byte[]... sets) Diff sortedsets.zDiffWithScores(String... sets) Diff sortedsets.zIncrBy(byte[] key, double increment, byte[] value) Increment the score of element withvaluein sorted set byincrement.Increment the score of element withvaluein sorted set byincrement.Set<byte[]>zInter(byte[]... sets) Intersect sortedsets.Intersect sortedsets.zInterStore(byte[] destKey, byte[]... sets) Intersect sortedsetsand store result in destinationdestKey.zInterStore(byte[] destKey, Aggregate aggregate, int[] weights, byte[]... sets) Intersect sortedsetsand store result in destinationdestKey.zInterStore(byte[] destKey, Aggregate aggregate, Weights weights, byte[]... sets) Intersect sortedsetsand store result in destinationdestKey.zInterStore(String destKey, String... sets) Intersect sortedsetsand store result in destinationkey.zInterStore(String destKey, Aggregate aggregate, int[] weights, String... sets) Intersect sortedsetsand store result in destinationkey.zInterWithScores(byte[]... sets) Intersect sortedsets.zInterWithScores(String... sets) Intersect sortedsets.zInterWithScores(Aggregate aggregate, Weights weights, byte[]... sets) Intersect sortedsets.zInterWithScores(Aggregate aggregate, Weights weights, String... sets) Intersect sortedsets.Count number of elements within sorted set with value betweenRange#minandRange#maxapplying lexicographical ordering.Count number of elements within sorted set with value betweenRange#minandRange#maxapplying lexicographical ordering.zMScore(byte[] key, byte[]... values) Get the scores of elements withvaluesfrom sorted set with keykey.Get the scores of elements withvaluesfrom sorted set with keykey.zPopMax(byte[] key) Remove and return the value with its score having the highest score from sorted set atkey.zPopMax(byte[] key, long count) Remove and returncountvalues with their score having the highest score from sorted set atkey.Remove and return the value with its score having the highest score from sorted set atkey.Remove and returncountvalues with their score having the highest score from sorted set atkey.zPopMin(byte[] key) Remove and return the value with its score having the lowest score from sorted set atkey.zPopMin(byte[] key, long count) Remove and returncountvalues with their score having the lowest score from sorted set atkey.Remove and return the value with its score having the lowest score from sorted set atkey.Remove and returncountvalues with their score having the lowest score from sorted set atkey.byte[]zRandMember(byte[] key) Get random element from sorted set atkey.List<byte[]>zRandMember(byte[] key, long count) Getcountrandom elements from sorted set atkey.zRandMember(String key) Get random element from sorted set atkey.zRandMember(String key, long count) Getcountrandom elements from sorted set atkey.zRandMemberWithScore(byte[] key) Get random element from sorted set atkey.zRandMemberWithScore(byte[] key, long count) Getcountrandom elements from sorted set atkey.Get random element from sorted set atkey.zRandMemberWithScores(String key, long count) Getcountrandom elements from sorted set atkey.Set<byte[]>zRange(byte[] key, long start, long end) Get elements betweenstartandendfrom sorted set.Get elements betweenstartandendfrom sorted set.Set<byte[]>zRangeByLex(byte[] key) Get all the elements in the sorted set at key in lexicographical ordering.Set<byte[]>zRangeByLex(byte[] key, Range<byte[]> range) Get all the elements inRangefrom the sorted set at key in lexicographical ordering.Set<byte[]>zRangeByLex(byte[] key, Range<byte[]> range, Limit limit) Get all the elements inRangefrom the sorted set at key in lexicographical ordering.zRangeByLex(String key) Get all the elements in the sorted set at key in lexicographical ordering.zRangeByLex(String key, Range<String> range) Get all the elements inRedisZSetCommands.Rangefrom the sorted set at key in lexicographical ordering.zRangeByLex(String key, Range<String> range, Limit limit) Get all the elements inRedisZSetCommands.Rangefrom the sorted set at key in lexicographical ordering.Set<byte[]>zRangeByScore(byte[] key, double min, double max) Get elements where score is betweenminandmaxfrom sorted set.Set<byte[]>zRangeByScore(byte[] key, double min, double max, long offset, long count) Get elements in range fromstarttoendwhere score is betweenminandmaxfrom sorted set.Set<byte[]>zRangeByScore(byte[] key, String min, String max) Get elements where score is betweenminandmaxfrom sorted set.Set<byte[]>zRangeByScore(byte[] key, String min, String max, long offset, long count) Get elements in range fromstarttoendwhere score is betweenminandmaxfrom sorted set.Set<byte[]>zRangeByScore(byte[] key, Range<? extends Number> range) Get elements where score is betweenRange#minandRange#maxfrom sorted set.Set<byte[]>zRangeByScore(byte[] key, Range<? extends Number> range, Limit limit) Get elements in range fromLimit#counttoLimit#offsetwhere score is betweenRange#minandRange#maxfrom sorted set.zRangeByScore(String key, double min, double max) Get elements where score is betweenminandmaxfrom sorted set.zRangeByScore(String key, double min, double max, long offset, long count) Get elements in range fromstarttoendwhere score is betweenminandmaxfrom sorted set.zRangeByScore(String key, String min, String max) Get elements where score is betweenminandmaxfrom sorted set.zRangeByScore(String key, String min, String max, long offset, long count) Get elements in range fromstarttoendwhere score is betweenminandmaxfrom sorted set.zRangeByScoreWithScores(byte[] key, double min, double max) zRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count) zRangeByScoreWithScores(byte[] key, Range<? extends Number> range) zRangeByScoreWithScores(byte[] key, Range<? extends Number> range, Limit limit) Get set ofTuples in range fromLimit#offsettoLimit#offset + Limit#countwhere score is betweenRange#minandRange#maxfrom sorted set.zRangeByScoreWithScores(String key, double min, double max) zRangeByScoreWithScores(String key, double min, double max, long offset, long count) zRangeStoreByLex(byte[] dstKey, byte[] srcKey, Range<byte[]> range, Limit limit) This command is like ZRANGE , but stores the result in the dstKey destination key.This command is like ZRANGE , but stores the result in the dstKey destination key.zRangeStoreByScore(byte[] dstKey, byte[] srcKey, Range<? extends Number> range, Limit limit) This command is like ZRANGE, but stores the result in the dstKey destination key.This command is like ZRANGE, but stores the result in the dstKey destination key.zRangeStoreRevByLex(byte[] dstKey, byte[] srcKey, Range<byte[]> range, Limit limit) This command is like ZRANGE … REV , but stores the result in the dstKey destination key.This command is like ZRANGE … REV , but stores the result in the dstKey destination key.zRangeStoreRevByScore(byte[] dstKey, byte[] srcKey, Range<? extends Number> range, Limit limit) This command is like ZRANGE … REV, but stores the result in the dstKey destination key.This command is like ZRANGE … REV, but stores the result in the dstKey destination key.zRangeWithScores(byte[] key, long start, long end) zRangeWithScores(String key, long start, long end) zRank(byte[] key, byte[] value) Determine the index of element withvaluein a sorted set.Determine the index of element withvaluein a sorted set.zRem(byte[] key, byte[]... values) Removevaluesfrom sorted set.Removevaluesfrom sorted set.zRemRange(byte[] key, long start, long end) Remove elements in range betweenstartandendfrom sorted set withkey.Remove elements in range betweenstartandendfrom sorted set withkey.zRemRangeByLex(byte[] key, Range<byte[]> range) Remove all elements between the lexicographicalRange.zRemRangeByLex(String key, Range<String> range) Remove all elements between the lexicographicalRedisZSetCommands.Range.zRemRangeByScore(byte[] key, double min, double max) Remove elements with scores betweenminandmaxfrom sorted set withkey.zRemRangeByScore(byte[] key, Range<? extends Number> range) Remove elements with scores betweenRange#minandRange#maxfrom sorted set withkey.zRemRangeByScore(String key, double min, double max) Remove elements with scores betweenminandmaxfrom sorted set withkey.Set<byte[]>zRevRange(byte[] key, long start, long end) Get elements in range fromstarttoendfrom sorted set ordered from high to low.Get elements in range fromstarttoendfrom sorted set ordered from high to low.Set<byte[]>zRevRangeByLex(byte[] key, Range<byte[]> range, Limit limit) Get all the elements inRangefrom the sorted set at key in reversed lexicographical ordering.zRevRangeByLex(String key, Range<String> range, Limit limit) Get all the elements inRedisZSetCommands.Rangefrom the sorted set at key in reversed lexicographical ordering.Set<byte[]>zRevRangeByScore(byte[] key, double min, double max) Get elements where score is betweenminandmaxfrom sorted set ordered from high to low.Set<byte[]>zRevRangeByScore(byte[] key, double min, double max, long offset, long count) Get elements in range fromstarttoendwhere score is betweenminandmaxfrom sorted set ordered high -> low.Set<byte[]>zRevRangeByScore(byte[] key, Range<? extends Number> range) Get elements where score is betweenRange#minandRange#maxfrom sorted set ordered from high to low.Set<byte[]>zRevRangeByScore(byte[] key, Range<? extends Number> range, Limit limit) Get elements in range fromLimit#offsettoLimit#offset + Limit#countwhere score is betweenRange#minandRange#maxfrom sorted set ordered high -> low.zRevRangeByScore(String key, double min, double max) Get elements where score is betweenminandmaxfrom sorted set ordered from high to low.zRevRangeByScore(String key, double min, double max, long offset, long count) Get elements in range fromstarttoendwhere score is betweenminandmaxfrom sorted set ordered high -> low.zRevRangeByScoreWithScores(byte[] key, double min, double max) zRevRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count) Get set ofTuplein range fromstarttoendwhere score is betweenminandmaxfrom sorted set ordered high -> low.zRevRangeByScoreWithScores(byte[] key, Range<? extends Number> range) Get set ofTuplewhere score is betweenRange#minandRange#maxfrom sorted set ordered from high to low.zRevRangeByScoreWithScores(byte[] key, Range<? extends Number> range, Limit limit) Get set ofTuplein range fromLimit#offsettoLimit#countwhere score is betweenRange#minandRange#maxfrom sorted set ordered high -> low.zRevRangeByScoreWithScores(String key, double min, double max) zRevRangeByScoreWithScores(String key, double min, double max, long offset, long count) Get set ofTuplein range fromstarttoendwhere score is betweenminandmaxfrom sorted set ordered high -> low.zRevRangeWithScores(byte[] key, long start, long end) zRevRangeWithScores(String key, long start, long end) zRevRank(byte[] key, byte[] value) Determine the index of element withvaluein a sorted set when scored high to low.Determine the index of element withvaluein a sorted set when scored high to low.zScan(byte[] key, ScanOptions options) Use aCursorto iterate over elements in sorted set atkey.zScan(String key, ScanOptions options) Use aCursorto iterate over elements in sorted set atkey.zScore(byte[] key, byte[] value) Get the score of element withvaluefrom sorted set with keykey.Get the score of element withvaluefrom sorted set with keykey.GetRedisZSetCommands.Set<byte[]>zUnion(byte[]... sets) Union sortedsets.Union sortedsets.zUnionStore(byte[] destKey, byte[]... sets) Union sortedsets.zUnionStore(byte[] destKey, Aggregate aggregate, int[] weights, byte[]... sets) Union sortedsetsand store result in destinationdestKey.zUnionStore(byte[] destKey, Aggregate aggregate, Weights weights, byte[]... sets) Union sortedsetsand store result in destinationdestKey.zUnionStore(String destKey, String... sets) Union sortedsetsand store result in destinationkey.zUnionStore(String destKey, Aggregate aggregate, int[] weights, String... sets) Union sortedsetsand store result in destinationkey.zUnionWithScores(byte[]... sets) Union sortedsets.zUnionWithScores(String... sets) Union sortedsets.zUnionWithScores(Aggregate aggregate, Weights weights, byte[]... sets) Union sortedsets.zUnionWithScores(Aggregate aggregate, Weights weights, String... sets) Union sortedsets.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.redis.connection.DefaultedRedisConnection
xRange, xRead, xReadGroup, xRevRange, zInterWithScores, zUnionWithScoresMethods inherited from interface org.springframework.data.redis.connection.RedisKeyCommands
restore, scanMethods inherited from interface org.springframework.data.redis.connection.RedisListCommands
lPosMethods inherited from interface org.springframework.data.redis.connection.RedisStreamCommands
xAck, xAdd, xAdd, xClaim, xDel, xGroupDelConsumer, xPending, xPending, xPending, xPending, xPendingMethods inherited from interface org.springframework.data.redis.connection.RedisStringCommands
bitPosMethods inherited from interface org.springframework.data.redis.connection.RedisZSetCommands
zAdd, zAdd, zRangeStoreByLex, zRangeStoreByScore, zRangeStoreRevByLex, zRangeStoreRevByScore, zRevRangeByLex, zRevRangeByLexMethods inherited from interface org.springframework.data.redis.connection.StringRedisConnection
bitPos, lPos, xAck, xAdd, xAdd, xClaim, xDel, xRange, xReadAsString, xReadAsString, xReadAsString, xReadGroupAsString, xReadGroupAsString, xReadGroupAsString, xRevRange, zInterWithScores, zRangeStoreByLex, zRangeStoreByScore, zRangeStoreRevByLex, zRangeStoreRevByScore, zRevRangeByLex, zRevRangeByLex, zUnionWithScores
-
Constructor Details
-
DefaultStringRedisConnection
Constructs a newDefaultStringRedisConnectioninstance. UsesStringRedisSerializeras underlying serializer.- Parameters:
connection- Redis connection
-
DefaultStringRedisConnection
Constructs a newDefaultStringRedisConnectioninstance.- Parameters:
connection- Redis connectionserializer- String serializer
-
-
Method Details
-
commands
Description copied from interface:RedisCommandsProviderGetRedisCommands.- Specified by:
commandsin interfaceRedisCommandsProvider- Returns:
- never null.
-
geoCommands
Description copied from interface:RedisCommandsProviderGetRedisGeoCommands.- Specified by:
geoCommandsin interfaceRedisCommandsProvider- Returns:
- never null.
-
hashCommands
Description copied from interface:RedisCommandsProviderGetRedisHashCommands.- Specified by:
hashCommandsin interfaceRedisCommandsProvider- Returns:
- never null.
-
hyperLogLogCommands
Description copied from interface:RedisCommandsProvider- Specified by:
hyperLogLogCommandsin interfaceRedisCommandsProvider- Returns:
- never null.
-
keyCommands
Description copied from interface:RedisCommandsProviderGetRedisKeyCommands.- Specified by:
keyCommandsin interfaceRedisCommandsProvider- Returns:
- never null.
-
listCommands
Description copied from interface:RedisCommandsProviderGetRedisListCommands.- Specified by:
listCommandsin interfaceRedisCommandsProvider- Returns:
- never null.
-
setCommands
Description copied from interface:RedisCommandsProviderGetRedisSetCommands.- Specified by:
setCommandsin interfaceRedisCommandsProvider- Returns:
- never null.
-
scriptingCommands
Description copied from interface:RedisCommandsProvider- Specified by:
scriptingCommandsin interfaceRedisCommandsProvider- Returns:
- never null.
-
serverCommands
Description copied from interface:RedisCommandsProviderGetRedisServerCommands.- Specified by:
serverCommandsin interfaceRedisCommandsProvider- Returns:
- never null.
-
streamCommands
Description copied from interface:RedisCommandsProviderGetRedisStreamCommands.- Specified by:
streamCommandsin interfaceRedisCommandsProvider- Returns:
- never null.
-
stringCommands
Description copied from interface:RedisCommandsProviderGetRedisStringCommands.- Specified by:
stringCommandsin interfaceRedisCommandsProvider- Returns:
- never null.
-
zSetCommands
Description copied from interface:RedisCommandsProviderGetRedisZSetCommands.- Specified by:
zSetCommandsin interfaceRedisCommandsProvider- Returns:
- never null.
-
append
Description copied from interface:RedisStringCommandsAppend avaluetokey.- Specified by:
appendin interfaceDefaultedRedisConnection- Specified by:
appendin interfaceRedisStringCommands- Parameters:
key- must not be null.value- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
bgSave
public void bgSave()Description copied from interface:RedisServerCommandsStart background saving of db on server.- Specified by:
bgSavein interfaceDefaultedRedisConnection- Specified by:
bgSavein interfaceRedisServerCommands- See Also:
-
bgReWriteAof
public void bgReWriteAof()Description copied from interface:RedisServerCommandsStart an Append Only File rewrite process on server.- Specified by:
bgReWriteAofin interfaceDefaultedRedisConnection- Specified by:
bgReWriteAofin interfaceRedisServerCommands- See Also:
-
bLPop
Description copied from interface:RedisListCommandsRemoves and returns first element from lists stored atkeys.
Blocks connection until element available ortimeoutreached.- Specified by:
bLPopin interfaceDefaultedRedisConnection- Specified by:
bLPopin interfaceRedisListCommands- Parameters:
timeout- seconds to block.keys- must not be null.- Returns:
- empty
Listwhen no element could be popped and the timeout was reached. null when used in pipeline / transaction. - See Also:
-
bRPop
Description copied from interface:RedisListCommandsRemoves and returns last element from lists stored atkeys.
Blocks connection until element available ortimeoutreached.- Specified by:
bRPopin interfaceDefaultedRedisConnection- Specified by:
bRPopin interfaceRedisListCommands- Parameters:
timeout- seconds to block.keys- must not be null.- Returns:
- empty
Listwhen no element could be popped and the timeout was reached. null when used in pipeline / transaction. - See Also:
-
bRPopLPush
public byte[] bRPopLPush(int timeout, byte[] srcKey, byte[] dstKey) Description copied from interface:RedisListCommandsRemove the last element from list atsrcKey, append it todstKeyand return its value.
Blocks connection until element available ortimeoutreached.- Specified by:
bRPopLPushin interfaceDefaultedRedisConnection- Specified by:
bRPopLPushin interfaceRedisListCommands- Parameters:
timeout- seconds to block.srcKey- must not be null.dstKey- must not be null.- Returns:
- can be null.
- See Also:
-
close
Description copied from interface:RedisConnectionCloses or quits the connection.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRedisConnection- Throws:
RedisSystemException
-
copy
Description copied from interface:RedisKeyCommandsCopy givensourceKeytotargetKey.- Specified by:
copyin interfaceDefaultedRedisConnection- Specified by:
copyin interfaceRedisKeyCommands- Parameters:
sourceKey- must not be null.targetKey- must not be null.replace- whether to replace existing keys.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
dbSize
Description copied from interface:RedisServerCommandsGet the total number of available keys in currently selected database.- Specified by:
dbSizein interfaceDefaultedRedisConnection- Specified by:
dbSizein interfaceRedisServerCommands- Returns:
- null when used in pipeline / transaction.
- See Also:
-
decr
Description copied from interface:RedisStringCommandsDecrement an integer value stored as string value ofkeyby 1.- Specified by:
decrin interfaceDefaultedRedisConnection- Specified by:
decrin interfaceRedisStringCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
decrBy
Description copied from interface:RedisStringCommandsDecrement an integer value stored as string value ofkeybyvalue.- Specified by:
decrByin interfaceDefaultedRedisConnection- Specified by:
decrByin interfaceRedisStringCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
del
Description copied from interface:RedisKeyCommandsDelete givenkeys.- Specified by:
delin interfaceDefaultedRedisConnection- Specified by:
delin interfaceRedisKeyCommands- Parameters:
keys- must not be null.- Returns:
- The number of keys that were removed. null when used in pipeline / transaction.
- See Also:
-
unlink
Description copied from interface:RedisKeyCommandsUnlink thekeysfrom the keyspace. Unlike withRedisKeyCommands.del(byte[]...)the actual memory reclaiming here happens asynchronously.- Specified by:
unlinkin interfaceDefaultedRedisConnection- Specified by:
unlinkin interfaceRedisKeyCommands- Parameters:
keys- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
discard
public void discard()Description copied from interface:RedisTxCommandsDiscard all commands issued afterRedisTxCommands.multi().- Specified by:
discardin interfaceRedisTxCommands- See Also:
-
echo
public byte[] echo(byte[] message) Description copied from interface:RedisConnectionCommandsReturnsmessagevia server roundtrip.- Specified by:
echoin interfaceRedisConnectionCommands- Parameters:
message- the message to echo.- Returns:
- the message or null when used in pipeline / transaction.
- See Also:
-
exec
Description copied from interface:RedisTxCommandsExecutes all queued commands in a transaction started withRedisTxCommands.multi().
If used along withRedisTxCommands.watch(byte[]...)the operation will fail if any of watched keys has been modified.- Specified by:
execin interfaceRedisTxCommands- Returns:
- List of replies for each executed command.
- See Also:
-
exists
Description copied from interface:RedisKeyCommandsDetermine if givenkeyexists.- Specified by:
existsin interfaceDefaultedRedisConnection- Specified by:
existsin interfaceRedisKeyCommands- Parameters:
key- must not be null.- Returns:
- true if key exists. null when used in pipeline / transaction.
- See Also:
-
exists
Description copied from interface:StringRedisConnectionCount how many of the givenkeysexist.- Specified by:
existsin interfaceStringRedisConnection- Parameters:
keys- must not be null.- Returns:
- See Also:
-
exists
Description copied from interface:RedisKeyCommandsCount how many of the givenkeysexist. Providing the very samekeymore than once also counts multiple times.- Specified by:
existsin interfaceDefaultedRedisConnection- Specified by:
existsin interfaceRedisKeyCommands- Parameters:
keys- must not be null.- Returns:
- the number of keys existing among the ones specified as arguments. null when used in pipeline / transaction.
-
expire
Description copied from interface:RedisKeyCommandsSet time to live for givenkeyin seconds.- Specified by:
expirein interfaceDefaultedRedisConnection- Specified by:
expirein interfaceRedisKeyCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
expireAt
Description copied from interface:RedisKeyCommandsSet the expiration for givenkeyas a UNIX timestamp.- Specified by:
expireAtin interfaceDefaultedRedisConnection- Specified by:
expireAtin interfaceRedisKeyCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
flushAll
public void flushAll()Description copied from interface:RedisServerCommandsDelete all all keys from all databases.- Specified by:
flushAllin interfaceDefaultedRedisConnection- Specified by:
flushAllin interfaceRedisServerCommands- See Also:
-
flushAll
Description copied from interface:RedisServerCommandsDelete all all keys from all databases using the specifiedRedisServerCommands.FlushOption.- Specified by:
flushAllin interfaceDefaultedRedisConnection- Specified by:
flushAllin interfaceRedisServerCommands- See Also:
-
flushDb
public void flushDb()Description copied from interface:RedisServerCommandsDelete all keys of the currently selected database.- Specified by:
flushDbin interfaceDefaultedRedisConnection- Specified by:
flushDbin interfaceRedisServerCommands- See Also:
-
flushDb
Description copied from interface:RedisServerCommandsDelete all keys of the currently selected database using the specifiedRedisServerCommands.FlushOption.- Specified by:
flushDbin interfaceDefaultedRedisConnection- Specified by:
flushDbin interfaceRedisServerCommands- See Also:
-
get
public byte[] get(byte[] key) Description copied from interface:RedisStringCommandsGet the value ofkey.- Specified by:
getin interfaceDefaultedRedisConnection- Specified by:
getin interfaceRedisStringCommands- Parameters:
key- must not be null.- Returns:
- null when key does not exist or used in pipeline / transaction.
- See Also:
-
getDel
Description copied from interface:RedisStringCommandsReturn the value atkeyand delete the key.- Specified by:
getDelin interfaceDefaultedRedisConnection- Specified by:
getDelin interfaceRedisStringCommands- Parameters:
key- must not be null.- Returns:
- null when key does not exist or used in pipeline / transaction.
- See Also:
-
getDel
Description copied from interface:StringRedisConnectionReturn the value atkeyand delete the key.- Specified by:
getDelin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- null when key does not exist or used in pipeline / transaction.
- See Also:
-
getEx
Description copied from interface:RedisStringCommandsReturn the value atkeyand expire the key by applyingExpiration.Use
Expiration.seconds(long)forEX.
UseExpiration.milliseconds(long)forPX.
UseExpiration.unixTimestamp(long, TimeUnit)forEXAT | PXAT.- Specified by:
getExin interfaceDefaultedRedisConnection- Specified by:
getExin interfaceRedisStringCommands- Parameters:
key- must not be null.expiration- must not be null.- Returns:
- null when key does not exist or used in pipeline / transaction.
- See Also:
-
getEx
Description copied from interface:StringRedisConnectionReturn the value atkeyand expire the key by applyingExpiration.- Specified by:
getExin interfaceStringRedisConnection- Parameters:
key- must not be null.expiration- must not be null.- Returns:
- null when key does not exist or used in pipeline / transaction.
- See Also:
-
getBit
Description copied from interface:RedisStringCommandsGet the bit value atoffsetof value atkey.- Specified by:
getBitin interfaceDefaultedRedisConnection- Specified by:
getBitin interfaceRedisStringCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
getConfig
Description copied from interface:RedisServerCommandsLoad configuration parameters for givenpatternfrom server.- Specified by:
getConfigin interfaceDefaultedRedisConnection- Specified by:
getConfigin interfaceRedisServerCommands- Parameters:
pattern- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
getNativeConnection
Description copied from interface:RedisConnectionReturns the native connection (the underlying library/driver object).- Specified by:
getNativeConnectionin interfaceRedisConnection- Returns:
- underlying, native object
-
getRange
public byte[] getRange(byte[] key, long start, long end) Description copied from interface:RedisStringCommandsGet a substring of value ofkeybetweenstartandend.- Specified by:
getRangein interfaceDefaultedRedisConnection- Specified by:
getRangein interfaceRedisStringCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
getSet
public byte[] getSet(byte[] key, byte[] value) Description copied from interface:RedisStringCommandsSetvalueofkeyand return its old value.- Specified by:
getSetin interfaceDefaultedRedisConnection- Specified by:
getSetin interfaceRedisStringCommands- Parameters:
key- must not be null.value- must not be null.- Returns:
- null if key did not exist before or when used in pipeline / transaction.
- See Also:
-
getSubscription
Description copied from interface:RedisPubSubCommandsReturns the current subscription for this connection or null if the connection is not subscribed.- Specified by:
getSubscriptionin interfaceRedisPubSubCommands- Returns:
- the current subscription, null if none is available.
-
hDel
Description copied from interface:RedisHashCommandsDelete given hashfields.- Specified by:
hDelin interfaceDefaultedRedisConnection- Specified by:
hDelin interfaceRedisHashCommands- Parameters:
key- must not be null.fields- must not be empty.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
hExists
Description copied from interface:RedisHashCommandsDetermine if given hashfieldexists.- Specified by:
hExistsin interfaceDefaultedRedisConnection- Specified by:
hExistsin interfaceRedisHashCommands- Parameters:
key- must not be null.field- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
hGet
public byte[] hGet(byte[] key, byte[] field) Description copied from interface:RedisHashCommandsGet value for givenfieldfrom hash atkey.- Specified by:
hGetin interfaceDefaultedRedisConnection- Specified by:
hGetin interfaceRedisHashCommands- Parameters:
key- must not be null.field- must not be null.- Returns:
- null when key or field do not exists or when used in pipeline / transaction.
- See Also:
-
hGetAll
Description copied from interface:RedisHashCommandsGet entire hash stored atkey.- Specified by:
hGetAllin interfaceDefaultedRedisConnection- Specified by:
hGetAllin interfaceRedisHashCommands- Parameters:
key- must not be null.- Returns:
- empty
Mapif key does not exist or null when used in pipeline / transaction. - See Also:
-
hIncrBy
Description copied from interface:RedisHashCommandsIncrementvalueof a hashfieldby the givendelta.- Specified by:
hIncrByin interfaceDefaultedRedisConnection- Specified by:
hIncrByin interfaceRedisHashCommands- Parameters:
key- must not be null.field- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
hIncrBy
Description copied from interface:RedisHashCommandsIncrementvalueof a hashfieldby the givendelta.- Specified by:
hIncrByin interfaceDefaultedRedisConnection- Specified by:
hIncrByin interfaceRedisHashCommands- Parameters:
key- must not be null.field- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
hKeys
Description copied from interface:RedisHashCommandsGet key set (fields) of hash atkey.- Specified by:
hKeysin interfaceDefaultedRedisConnection- Specified by:
hKeysin interfaceRedisHashCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
hLen
Description copied from interface:RedisHashCommandsGet size of hash atkey.- Specified by:
hLenin interfaceDefaultedRedisConnection- Specified by:
hLenin interfaceRedisHashCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
hMGet
Description copied from interface:RedisHashCommandsGet values for givenfieldsfrom hash atkey. Values are in the order of the requested keys Absent field values are represented using null in the resultingList.- Specified by:
hMGetin interfaceDefaultedRedisConnection- Specified by:
hMGetin interfaceRedisHashCommands- Parameters:
key- must not be null.fields- must not be empty.- Returns:
- empty
Listif key does not exist. null when used in pipeline / transaction. - See Also:
-
hMSet
Description copied from interface:RedisHashCommandsSet multiple hash fields to multiple values using data provided inhashes- Specified by:
hMSetin interfaceDefaultedRedisConnection- Specified by:
hMSetin interfaceRedisHashCommands- Parameters:
key- must not be null.hashes- must not be null.- See Also:
-
hSet
Description copied from interface:RedisHashCommandsSet thevalueof a hashfield.- Specified by:
hSetin interfaceDefaultedRedisConnection- Specified by:
hSetin interfaceRedisHashCommands- Parameters:
key- must not be null.field- must not be null.value- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
hSetNX
Description copied from interface:RedisHashCommandsSet thevalueof a hashfieldonly iffielddoes not exist.- Specified by:
hSetNXin interfaceDefaultedRedisConnection- Specified by:
hSetNXin interfaceRedisHashCommands- Parameters:
key- must not be null.field- must not be null.value- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
hVals
Description copied from interface:RedisHashCommandsGet entry set (values) of hash atfield.- Specified by:
hValsin interfaceDefaultedRedisConnection- Specified by:
hValsin interfaceRedisHashCommands- Parameters:
key- must not be null.- Returns:
- empty
Listif key does not exist. null when used in pipeline / transaction. - See Also:
-
incr
Description copied from interface:RedisStringCommandsIncrement an integer value stored as string value ofkeyby 1.- Specified by:
incrin interfaceDefaultedRedisConnection- Specified by:
incrin interfaceRedisStringCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
incrBy
Description copied from interface:RedisStringCommandsIncrement an integer value stored ofkeybydelta.- Specified by:
incrByin interfaceDefaultedRedisConnection- Specified by:
incrByin interfaceRedisStringCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
incrBy
Description copied from interface:RedisStringCommandsIncrement a floating point number value ofkeybydelta.- Specified by:
incrByin interfaceDefaultedRedisConnection- Specified by:
incrByin interfaceRedisStringCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
info
Description copied from interface:RedisServerCommandsLoad default server information like- memory
- cpu utilization
- replication
- Specified by:
infoin interfaceDefaultedRedisConnection- Specified by:
infoin interfaceRedisServerCommands- Returns:
- null when used in pipeline / transaction.
- See Also:
-
info
Description copied from interface:RedisServerCommandsLoad server information for givenselection.- Specified by:
infoin interfaceDefaultedRedisConnection- Specified by:
infoin interfaceRedisServerCommands- Returns:
- null when used in pipeline / transaction.
- See Also:
-
isClosed
public boolean isClosed()Description copied from interface:RedisConnectionIndicates whether the underlying connection is closed or not.- Specified by:
isClosedin interfaceRedisConnection- Returns:
- true if the connection is closed, false otherwise.
-
isQueueing
public boolean isQueueing()Description copied from interface:RedisConnectionIndicates whether the connection is in "queue"(or "MULTI") mode or not. When queueing, all commands are postponed until EXEC or DISCARD commands are issued. Since in queueing no results are returned, the connection will return NULL on all operations that interact with the data.- Specified by:
isQueueingin interfaceRedisConnection- Returns:
- true if the connection is in queue/MULTI mode, false otherwise
-
isSubscribed
public boolean isSubscribed()Description copied from interface:RedisPubSubCommandsIndicates whether the current connection is subscribed (to at least one channel) or not.- Specified by:
isSubscribedin interfaceRedisPubSubCommands- Returns:
- true if the connection is subscribed, false otherwise
-
keys
Description copied from interface:RedisKeyCommandsFind all keys matching the givenpattern.- Specified by:
keysin interfaceDefaultedRedisConnection- Specified by:
keysin interfaceRedisKeyCommands- Parameters:
pattern- must not be null.- Returns:
- empty
Setif no match found. null when used in pipeline / transaction. - See Also:
-
lastSave
Description copied from interface:RedisServerCommandsGet time of lastRedisServerCommands.bgSave()operation in seconds.- Specified by:
lastSavein interfaceDefaultedRedisConnection- Specified by:
lastSavein interfaceRedisServerCommands- Returns:
- null when used in pipeline / transaction.
- See Also:
-
lIndex
public byte[] lIndex(byte[] key, long index) Description copied from interface:RedisListCommandsGet element atindexform list atkey.- Specified by:
lIndexin interfaceDefaultedRedisConnection- Specified by:
lIndexin interfaceRedisListCommands- Parameters:
key- must not be null.index- zero based index value. Use negative number to designate elements starting at the tail.- Returns:
- null when index is out of range or when used in pipeline / transaction.
- See Also:
-
lInsert
Description copied from interface:RedisListCommandsInsertvalueRedisListCommands.Position.BEFOREorRedisListCommands.Position.AFTERexistingpivotforkey.- Specified by:
lInsertin interfaceDefaultedRedisConnection- Specified by:
lInsertin interfaceRedisListCommands- Parameters:
key- must not be null.where- must not be null.pivot- must not be null.value- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
lMove
public byte[] lMove(byte[] sourceKey, byte[] destinationKey, RedisListCommands.Direction from, RedisListCommands.Direction to) Description copied from interface:RedisListCommandsAtomically returns and removes the first/last element (head/tail depending on thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) of the list stored atdestinationKey.- Specified by:
lMovein interfaceDefaultedRedisConnection- Specified by:
lMovein interfaceRedisListCommands- Parameters:
sourceKey- must not be null.destinationKey- must not be null.from- must not be null.to- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
bLMove
public byte[] bLMove(byte[] sourceKey, byte[] destinationKey, RedisListCommands.Direction from, RedisListCommands.Direction to, double timeout) Description copied from interface:RedisListCommandsAtomically returns and removes the first/last element (head/tail depending on thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) of the list stored atdestinationKey.Blocks connection until element available or
timeoutreached.- Specified by:
bLMovein interfaceDefaultedRedisConnection- Specified by:
bLMovein interfaceRedisListCommands- Parameters:
sourceKey- must not be null.destinationKey- must not be null.from- must not be null.to- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
lMove
public String lMove(String sourceKey, String destinationKey, RedisListCommands.Direction from, RedisListCommands.Direction to) Description copied from interface:StringRedisConnectionAtomically returns and removes the first/last element (head/tail depending on thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) of the list stored atdestinationKey.- Specified by:
lMovein interfaceStringRedisConnection- Parameters:
sourceKey- must not be null.destinationKey- must not be null.from- must not be null.to- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
bLMove
public String bLMove(String sourceKey, String destinationKey, RedisListCommands.Direction from, RedisListCommands.Direction to, double timeout) Description copied from interface:StringRedisConnectionAtomically returns and removes the first/last element (head/tail depending on thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) of the list stored atdestinationKey.- Specified by:
bLMovein interfaceStringRedisConnection- Parameters:
sourceKey- must not be null.destinationKey- must not be null.from- must not be null.to- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
lLen
Description copied from interface:RedisListCommandsGet the size of list stored atkey.- Specified by:
lLenin interfaceDefaultedRedisConnection- Specified by:
lLenin interfaceRedisListCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
lPop
public byte[] lPop(byte[] key) Description copied from interface:RedisListCommandsRemoves and returns first element in list stored atkey.- Specified by:
lPopin interfaceDefaultedRedisConnection- Specified by:
lPopin interfaceRedisListCommands- Parameters:
key- must not be null.- Returns:
- null when key does not exist or used in pipeline / transaction.
- See Also:
-
lPop
Description copied from interface:RedisListCommandsRemoves and returns first elements in list stored atkey.- Specified by:
lPopin interfaceDefaultedRedisConnection- Specified by:
lPopin interfaceRedisListCommands- Parameters:
key- must not be null.- Returns:
- null when key does not exist or used in pipeline / transaction.
- See Also:
-
lPos
Description copied from interface:RedisListCommandsReturns the index of matching elements inside the list stored at given key.
Requires Redis 6.0.6 or newer.- Specified by:
lPosin interfaceDefaultedRedisConnection- Specified by:
lPosin interfaceRedisListCommands- Parameters:
key- must not be null.element- must not be null.rank- specifies the "rank" of the first element to return, in case there are multiple matches. A rank of 1 means to return the first match, 2 to return the second match, and so forth.count- number of matches to return.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
lPush
Description copied from interface:RedisListCommandsPrependvaluestokey.- Specified by:
lPushin interfaceDefaultedRedisConnection- Specified by:
lPushin interfaceRedisListCommands- Parameters:
key- must not be null.values- must not be empty.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
lPushX
Description copied from interface:RedisListCommandsPrependvaluestokeyonly if the list exists.- Specified by:
lPushXin interfaceDefaultedRedisConnection- Specified by:
lPushXin interfaceRedisListCommands- Parameters:
key- must not be null.value- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
lRange
Description copied from interface:RedisListCommandsGet elements betweenstartandendfrom list atkey.- Specified by:
lRangein interfaceDefaultedRedisConnection- Specified by:
lRangein interfaceRedisListCommands- Parameters:
key- must not be null.- Returns:
- empty
Listif key does not exists or range does not contain values. null when used in pipeline / transaction. - See Also:
-
lRem
Description copied from interface:RedisListCommandsRemoves the firstcountoccurrences ofvaluefrom the list stored atkey.- Specified by:
lRemin interfaceDefaultedRedisConnection- Specified by:
lRemin interfaceRedisListCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
lSet
public void lSet(byte[] key, long index, byte[] value) Description copied from interface:RedisListCommandsSet thevaluelist element atindex.- Specified by:
lSetin interfaceDefaultedRedisConnection- Specified by:
lSetin interfaceRedisListCommands- Parameters:
key- must not be null.- See Also:
-
lTrim
public void lTrim(byte[] key, long start, long end) Description copied from interface:RedisListCommandsTrim list atkeyto elements betweenstartandend.- Specified by:
lTrimin interfaceDefaultedRedisConnection- Specified by:
lTrimin interfaceRedisListCommands- Parameters:
key- must not be null.- See Also:
-
mGet
Description copied from interface:RedisStringCommandsGet multiplekeys. Values are in the order of the requested keys Absent field values are represented using null in the resultingList.- Specified by:
mGetin interfaceDefaultedRedisConnection- Specified by:
mGetin interfaceRedisStringCommands- Parameters:
keys- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
mSet
Description copied from interface:RedisStringCommandsSet multiple keys to multiple values using key-value pairs provided intuple.- Specified by:
mSetin interfaceDefaultedRedisConnection- Specified by:
mSetin interfaceRedisStringCommands- Parameters:
tuple- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
mSetNX
Description copied from interface:RedisStringCommandsSet multiple keys to multiple values using key-value pairs provided intupleonly if the provided key does not exist.- Specified by:
mSetNXin interfaceDefaultedRedisConnection- Specified by:
mSetNXin interfaceRedisStringCommands- Parameters:
tuple- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
multi
public void multi()Description copied from interface:RedisTxCommandsMark the start of a transaction block.
Commands will be queued and can then be executed by callingRedisTxCommands.exec()or rolled back usingRedisTxCommands.discard()- Specified by:
multiin interfaceRedisTxCommands- See Also:
-
persist
Description copied from interface:RedisKeyCommandsRemove the expiration from givenkey.- Specified by:
persistin interfaceDefaultedRedisConnection- Specified by:
persistin interfaceRedisKeyCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
move
Description copied from interface:RedisKeyCommandsMove givenkeyto database withindex.- Specified by:
movein interfaceDefaultedRedisConnection- Specified by:
movein interfaceRedisKeyCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
ping
Description copied from interface:RedisConnectionCommandsTest connection.- Specified by:
pingin interfaceRedisConnectionCommands- Returns:
- Server response message - usually PONG. null when used in pipeline / transaction.
- See Also:
-
pSubscribe
Description copied from interface:RedisPubSubCommandsSubscribes the connection to all channels matching the given patterns. Once subscribed, a connection enters listening mode and can only subscribe to other channels or unsubscribe. No other commands are accepted until the connection is unsubscribed.Note that this operation is blocking and the current thread starts waiting for new messages immediately.
- Specified by:
pSubscribein interfaceRedisPubSubCommands- Parameters:
listener- message listener, must not be null.patterns- channel name patterns, must not be null.- See Also:
-
publish
Description copied from interface:RedisPubSubCommandsPublishes the given message to the given channel.- Specified by:
publishin interfaceRedisPubSubCommands- Parameters:
channel- the channel to publish to. Must not be null.message- message to publish. Must not be null.- Returns:
- the number of clients that received the message or null when used in pipeline / transaction.
- See Also:
-
randomKey
public byte[] randomKey()Description copied from interface:RedisKeyCommandsReturn a random key from the keyspace.- Specified by:
randomKeyin interfaceDefaultedRedisConnection- Specified by:
randomKeyin interfaceRedisKeyCommands- Returns:
- null if no keys available or when used in pipeline or transaction.
- See Also:
-
rename
public void rename(byte[] oldKey, byte[] newKey) Description copied from interface:RedisKeyCommandsRename keyoldKeytonewKey.- Specified by:
renamein interfaceDefaultedRedisConnection- Specified by:
renamein interfaceRedisKeyCommands- Parameters:
oldKey- must not be null.newKey- must not be null.- See Also:
-
renameNX
Description copied from interface:RedisKeyCommandsRename keyoldKeytonewKeyonly ifnewKeydoes not exist.- Specified by:
renameNXin interfaceDefaultedRedisConnection- Specified by:
renameNXin interfaceRedisKeyCommands- Parameters:
oldKey- must not be null.newKey- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
resetConfigStats
public void resetConfigStats()Description copied from interface:RedisServerCommandsReset statistic counters on server.
Counters can be retrieved usingRedisServerCommands.info().- Specified by:
resetConfigStatsin interfaceDefaultedRedisConnection- Specified by:
resetConfigStatsin interfaceRedisServerCommands- See Also:
-
rewriteConfig
public void rewriteConfig()Description copied from interface:RedisServerCommandsRewrites theredis.conffile.- Specified by:
rewriteConfigin interfaceDefaultedRedisConnection- Specified by:
rewriteConfigin interfaceRedisServerCommands- See Also:
-
rPop
public byte[] rPop(byte[] key) Description copied from interface:RedisListCommandsRemoves and returns last element in list stored atkey.- Specified by:
rPopin interfaceDefaultedRedisConnection- Specified by:
rPopin interfaceRedisListCommands- Parameters:
key- must not be null.- Returns:
- null when key does not exist or used in pipeline / transaction.
- See Also:
-
rPop
Description copied from interface:RedisListCommandsRemoves and returns last elements in list stored atkey.- Specified by:
rPopin interfaceDefaultedRedisConnection- Specified by:
rPopin interfaceRedisListCommands- Parameters:
key- must not be null.- Returns:
- null when key does not exist or used in pipeline / transaction.
- See Also:
-
rPopLPush
public byte[] rPopLPush(byte[] srcKey, byte[] dstKey) Description copied from interface:RedisListCommandsRemove the last element from list atsrcKey, append it todstKeyand return its value.- Specified by:
rPopLPushin interfaceDefaultedRedisConnection- Specified by:
rPopLPushin interfaceRedisListCommands- Parameters:
srcKey- must not be null.dstKey- must not be null.- Returns:
- can be null.
- See Also:
-
rPush
Description copied from interface:RedisListCommandsAppendvaluestokey.- Specified by:
rPushin interfaceDefaultedRedisConnection- Specified by:
rPushin interfaceRedisListCommands- Parameters:
key- must not be null.values- must not be empty.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
rPushX
Description copied from interface:RedisListCommandsAppendvaluestokeyonly if the list exists.- Specified by:
rPushXin interfaceDefaultedRedisConnection- Specified by:
rPushXin interfaceRedisListCommands- Parameters:
key- must not be null.value- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
sAdd
Description copied from interface:RedisSetCommandsAdd givenvaluesto set atkey.- Specified by:
sAddin interfaceDefaultedRedisConnection- Specified by:
sAddin interfaceRedisSetCommands- Parameters:
key- must not be null.values- must not be empty.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
save
public void save()Description copied from interface:RedisServerCommandsSynchronous save current db snapshot on server.- Specified by:
savein interfaceDefaultedRedisConnection- Specified by:
savein interfaceRedisServerCommands- See Also:
-
sCard
Description copied from interface:RedisSetCommandsGet size of set atkey.- Specified by:
sCardin interfaceDefaultedRedisConnection- Specified by:
sCardin interfaceRedisSetCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
sDiff
Description copied from interface:RedisSetCommandsDiff all sets for givenkeys.- Specified by:
sDiffin interfaceDefaultedRedisConnection- Specified by:
sDiffin interfaceRedisSetCommands- Parameters:
keys- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
sDiffStore
Description copied from interface:RedisSetCommandsDiff all sets for givenkeysand store result indestKey.- Specified by:
sDiffStorein interfaceDefaultedRedisConnection- Specified by:
sDiffStorein interfaceRedisSetCommands- Parameters:
destKey- must not be null.keys- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
select
public void select(int dbIndex) Description copied from interface:RedisConnectionCommandsSelect the DB with given positivedbIndex.- Specified by:
selectin interfaceRedisConnectionCommands- Parameters:
dbIndex- the database index.- See Also:
-
set
Description copied from interface:RedisStringCommandsSetvalueforkey.- Specified by:
setin interfaceDefaultedRedisConnection- Specified by:
setin interfaceRedisStringCommands- Parameters:
key- must not be null.value- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
set
public Boolean set(byte[] key, byte[] value, Expiration expiration, RedisStringCommands.SetOption option) Description copied from interface:RedisStringCommandsSetvalueforkeyapplying timeouts fromexpirationif set and inserting/updating values depending onoption.- Specified by:
setin interfaceDefaultedRedisConnection- Specified by:
setin interfaceRedisStringCommands- Parameters:
key- must not be null.value- must not be null.expiration- must not be null. UseExpiration.persistent()to not set any ttl orExpiration.keepTtl()to keep the existing expiration.option- must not be null. UseRedisStringCommands.SetOption.upsert()to add non existing.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
setBit
Description copied from interface:RedisStringCommandsSets the bit atoffsetin value stored atkey.- Specified by:
setBitin interfaceDefaultedRedisConnection- Specified by:
setBitin interfaceRedisStringCommands- Parameters:
key- must not be null.- Returns:
- the original bit value stored at
offsetor null when used in pipeline / transaction. - See Also:
-
setConfig
Description copied from interface:RedisServerCommandsSet server configuration forparamtovalue.- Specified by:
setConfigin interfaceDefaultedRedisConnection- Specified by:
setConfigin interfaceRedisServerCommands- Parameters:
param- must not be null.value- must not be null.- See Also:
-
setEx
Description copied from interface:RedisStringCommandsSet thevalueand expiration insecondsforkey.- Specified by:
setExin interfaceDefaultedRedisConnection- Specified by:
setExin interfaceRedisStringCommands- Parameters:
key- must not be null.value- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
pSetEx
Description copied from interface:RedisStringCommandsSet thevalueand expiration inmillisecondsforkey.- Specified by:
pSetExin interfaceDefaultedRedisConnection- Specified by:
pSetExin interfaceRedisStringCommands- Parameters:
key- must not be null.value- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
setNX
Description copied from interface:RedisStringCommandsSetvalueforkey, only ifkeydoes not exist.- Specified by:
setNXin interfaceDefaultedRedisConnection- Specified by:
setNXin interfaceRedisStringCommands- Parameters:
key- must not be null.value- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
setRange
public void setRange(byte[] key, byte[] value, long start) Description copied from interface:RedisStringCommandsOverwrite parts ofkeystarting at the specifiedoffsetwith givenvalue.- Specified by:
setRangein interfaceDefaultedRedisConnection- Specified by:
setRangein interfaceRedisStringCommands- Parameters:
key- must not be null.- See Also:
-
shutdown
public void shutdown()Description copied from interface:RedisServerCommandsShutdown server.- Specified by:
shutdownin interfaceDefaultedRedisConnection- Specified by:
shutdownin interfaceRedisServerCommands- See Also:
-
shutdown
Description copied from interface:RedisServerCommandsShutdown server.- Specified by:
shutdownin interfaceDefaultedRedisConnection- Specified by:
shutdownin interfaceRedisServerCommands- See Also:
-
sInter
Description copied from interface:RedisSetCommandsReturns the members intersecting all given sets atkeys.- Specified by:
sInterin interfaceDefaultedRedisConnection- Specified by:
sInterin interfaceRedisSetCommands- Parameters:
keys- must not be null.- Returns:
- empty
Setif no intersection found. null when used in pipeline / transaction. - See Also:
-
sInterStore
Description copied from interface:RedisSetCommandsIntersect all given sets atkeysand store result indestKey.- Specified by:
sInterStorein interfaceDefaultedRedisConnection- Specified by:
sInterStorein interfaceRedisSetCommands- Parameters:
destKey- must not be null.keys- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
sIsMember
Description copied from interface:RedisSetCommandsCheck if set atkeycontainsvalue.- Specified by:
sIsMemberin interfaceDefaultedRedisConnection- Specified by:
sIsMemberin interfaceRedisSetCommands- Parameters:
key- must not be null.value- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
sMIsMember
Description copied from interface:RedisSetCommandsCheck if set atkeycontains one or morevalues.- Specified by:
sMIsMemberin interfaceDefaultedRedisConnection- Specified by:
sMIsMemberin interfaceRedisSetCommands- Parameters:
key- must not be null.values- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
sMembers
Description copied from interface:RedisSetCommandsGet all elements of set atkey.- Specified by:
sMembersin interfaceDefaultedRedisConnection- Specified by:
sMembersin interfaceRedisSetCommands- Parameters:
key- must not be null.- Returns:
- empty
Setwhen key does not exist. null when used in pipeline / transaction. - See Also:
-
sMove
Description copied from interface:RedisSetCommandsMovevaluefromsrcKeytodestKey- Specified by:
sMovein interfaceDefaultedRedisConnection- Specified by:
sMovein interfaceRedisSetCommands- Parameters:
srcKey- must not be null.destKey- must not be null.value- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
sort
Description copied from interface:RedisKeyCommandsSort the elements forkeyand store result instoreKey.- Specified by:
sortin interfaceDefaultedRedisConnection- Specified by:
sortin interfaceRedisKeyCommands- Parameters:
key- must not be null.params- must not be null.storeKey- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
sort
Description copied from interface:RedisKeyCommandsSort the elements forkey.- Specified by:
sortin interfaceDefaultedRedisConnection- Specified by:
sortin interfaceRedisKeyCommands- Parameters:
key- must not be null.params- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
encodingOf
Description copied from interface:RedisKeyCommandsGet the type of internal representation used for storing the value at the givenkey.- Specified by:
encodingOfin interfaceDefaultedRedisConnection- Specified by:
encodingOfin interfaceRedisKeyCommands- Parameters:
key- must not be null.- Returns:
ValueEncoding.RedisValueEncoding.VACANTif key does not exist or null when used in pipeline / transaction.- See Also:
-
idletime
Description copied from interface:RedisKeyCommandsGet theDurationsince the object stored at the givenkeyis idle.- Specified by:
idletimein interfaceDefaultedRedisConnection- Specified by:
idletimein interfaceRedisKeyCommands- Parameters:
key- must not be null.- Returns:
- null if key does not exist or when used in pipeline / transaction.
- See Also:
-
refcount
Description copied from interface:RedisKeyCommandsGet the number of references of the value associated with the specifiedkey.- Specified by:
refcountin interfaceDefaultedRedisConnection- Specified by:
refcountin interfaceRedisKeyCommands- Parameters:
key- must not be null.- Returns:
- null if key does not exist or when used in pipeline / transaction.
- See Also:
-
sPop
public byte[] sPop(byte[] key) Description copied from interface:RedisSetCommandsRemove and return a random member from set atkey.- Specified by:
sPopin interfaceDefaultedRedisConnection- Specified by:
sPopin interfaceRedisSetCommands- Parameters:
key- must not be null.- Returns:
- null when key does not exist or used in pipeline / transaction.
- See Also:
-
sPop
Description copied from interface:RedisSetCommandsRemove and returncountrandom members from set atkey.- Specified by:
sPopin interfaceDefaultedRedisConnection- Specified by:
sPopin interfaceRedisSetCommands- Parameters:
key- must not be null.count- number of random members to pop from the set.- Returns:
- empty
Listif set does not exist. null when used in pipeline / transaction. - See Also:
-
sRandMember
public byte[] sRandMember(byte[] key) Description copied from interface:RedisSetCommandsGet random element from set atkey.- Specified by:
sRandMemberin interfaceDefaultedRedisConnection- Specified by:
sRandMemberin interfaceRedisSetCommands- Parameters:
key- must not be null.- Returns:
- can be null.
- See Also:
-
sRandMember
Description copied from interface:RedisSetCommandsGetcountrandom elements from set atkey.- Specified by:
sRandMemberin interfaceDefaultedRedisConnection- Specified by:
sRandMemberin interfaceRedisSetCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
sRem
Description copied from interface:RedisSetCommandsRemove givenvaluesfrom set atkeyand return the number of removed elements.- Specified by:
sRemin interfaceDefaultedRedisConnection- Specified by:
sRemin interfaceRedisSetCommands- Parameters:
key- must not be null.values- must not be empty.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
strLen
Description copied from interface:RedisStringCommandsGet the length of the value stored atkey.- Specified by:
strLenin interfaceDefaultedRedisConnection- Specified by:
strLenin interfaceRedisStringCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
bitCount
Description copied from interface:RedisStringCommandsCount the number of set bits (population counting) in value stored atkey.- Specified by:
bitCountin interfaceDefaultedRedisConnection- Specified by:
bitCountin interfaceRedisStringCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
bitCount
Description copied from interface:RedisStringCommandsCount the number of set bits (population counting) of value stored atkeybetweenstartandend.- Specified by:
bitCountin interfaceDefaultedRedisConnection- Specified by:
bitCountin interfaceRedisStringCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
bitOp
Description copied from interface:RedisStringCommandsPerform bitwise operations between strings.- Specified by:
bitOpin interfaceDefaultedRedisConnection- Specified by:
bitOpin interfaceRedisStringCommands- Parameters:
op- must not be null.destination- must not be null.keys- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
bitPos
Description copied from interface:RedisStringCommandsReturn the position of the first bit set to givenbitin a string.Rangestart and end can contain negative values in order to index bytes starting from the end of the string, where -1 is the last byte, -2 is the penultimate.- Specified by:
bitPosin interfaceDefaultedRedisConnection- Specified by:
bitPosin interfaceRedisStringCommands- Parameters:
key- the key holding the actual String.bit- the bit value to look for.range- must not be null. UseRange.unbounded()to not limit search.- Returns:
- null when used in pipeline / transaction. The position of the first bit set to 1 or 0 according to the request.
- See Also:
-
subscribe
Description copied from interface:RedisPubSubCommandsSubscribes the connection to the given channels. Once subscribed, a connection enters listening mode and can only subscribe to other channels or unsubscribe. No other commands are accepted until the connection is unsubscribed.Note that this operation is blocking and the current thread starts waiting for new messages immediately.
- Specified by:
subscribein interfaceRedisPubSubCommands- Parameters:
listener- message listener, must not be null.channels- channel names, must not be null.- See Also:
-
sUnion
Description copied from interface:RedisSetCommandsUnion all sets at givenkeys.- Specified by:
sUnionin interfaceDefaultedRedisConnection- Specified by:
sUnionin interfaceRedisSetCommands- Parameters:
keys- must not be null.- Returns:
- empty
Setif keys do not exist. null when used in pipeline / transaction. - See Also:
-
sUnionStore
Description copied from interface:RedisSetCommandsUnion all sets at givenkeysand store result indestKey.- Specified by:
sUnionStorein interfaceDefaultedRedisConnection- Specified by:
sUnionStorein interfaceRedisSetCommands- Parameters:
destKey- must not be null.keys- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
ttl
Description copied from interface:RedisKeyCommandsGet the time to live forkeyin seconds.- Specified by:
ttlin interfaceDefaultedRedisConnection- Specified by:
ttlin interfaceRedisKeyCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
ttl
Description copied from interface:RedisKeyCommandsGet the time to live forkeyin and convert it to the givenTimeUnit.- Specified by:
ttlin interfaceDefaultedRedisConnection- Specified by:
ttlin interfaceRedisKeyCommands- Parameters:
key- must not be null.timeUnit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
type
Description copied from interface:RedisKeyCommandsDetermine the type stored atkey.- Specified by:
typein interfaceDefaultedRedisConnection- Specified by:
typein interfaceRedisKeyCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
touch
Description copied from interface:RedisKeyCommandsAlter the last access time of givenkey(s).- Specified by:
touchin interfaceDefaultedRedisConnection- Specified by:
touchin interfaceRedisKeyCommands- Parameters:
keys- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
unwatch
public void unwatch()Description copied from interface:RedisTxCommandsFlushes all the previouslyRedisTxCommands.watch(byte[]...)keys.- Specified by:
unwatchin interfaceRedisTxCommands- See Also:
-
watch
public void watch(byte[]... keys) Description copied from interface:RedisTxCommandsWatch givenkeysfor modifications during transaction started withRedisTxCommands.multi().- Specified by:
watchin interfaceRedisTxCommands- Parameters:
keys- must not be null.- See Also:
-
zAdd
Description copied from interface:RedisZSetCommands- Specified by:
zAddin interfaceDefaultedRedisConnection- Specified by:
zAddin interfaceRedisZSetCommands- Parameters:
key- must not be null.score- the score.value- the value.args- must not be null useRedisZSetCommands.ZAddArgs.empty()instead.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zAdd
Description copied from interface:RedisZSetCommands- Specified by:
zAddin interfaceDefaultedRedisConnection- Specified by:
zAddin interfaceRedisZSetCommands- Parameters:
key- must not be null.tuples- must not be null.args- must not be null useRedisZSetCommands.ZAddArgs.empty()instead.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zCard
Description copied from interface:RedisZSetCommandsGet the size of sorted set withkey.- Specified by:
zCardin interfaceDefaultedRedisConnection- Specified by:
zCardin interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zCount
Description copied from interface:RedisZSetCommandsCount number of elements within sorted set with scores betweenminandmax.- Specified by:
zCountin interfaceDefaultedRedisConnection- Specified by:
zCountin interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zCount
Description copied from interface:RedisZSetCommandsCount number of elements within sorted set with scores betweenRange#minandRange#max.- Specified by:
zCountin interfaceDefaultedRedisConnection- Specified by:
zCountin interfaceRedisZSetCommands- Parameters:
key- must not be null.range- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zIncrBy
Description copied from interface:RedisZSetCommandsIncrement the score of element withvaluein sorted set byincrement.- Specified by:
zIncrByin interfaceDefaultedRedisConnection- Specified by:
zIncrByin interfaceRedisZSetCommands- Parameters:
key- must not be null.value- the value.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zDiff
Description copied from interface:RedisZSetCommandsDiff sortedsets.- Specified by:
zDiffin interfaceDefaultedRedisConnection- Specified by:
zDiffin interfaceRedisZSetCommands- Parameters:
sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zDiffWithScores
Description copied from interface:RedisZSetCommandsDiff sortedsets.- Specified by:
zDiffWithScoresin interfaceDefaultedRedisConnection- Specified by:
zDiffWithScoresin interfaceRedisZSetCommands- Parameters:
sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zDiffStore
Description copied from interface:RedisZSetCommandsDiff sortedsetsand store result in destinationdestKey.- Specified by:
zDiffStorein interfaceDefaultedRedisConnection- Specified by:
zDiffStorein interfaceRedisZSetCommands- Parameters:
destKey- must not be null.sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zDiff
Description copied from interface:StringRedisConnectionDiff sortedsets.- Specified by:
zDiffin interfaceStringRedisConnection- Parameters:
sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zDiffWithScores
Description copied from interface:StringRedisConnectionDiff sortedsets.- Specified by:
zDiffWithScoresin interfaceStringRedisConnection- Parameters:
sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zDiffStore
Description copied from interface:StringRedisConnectionDiff sortedsetsand store result in destinationdestKey.- Specified by:
zDiffStorein interfaceStringRedisConnection- Parameters:
destKey- must not be null.sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zInter
Description copied from interface:RedisZSetCommandsIntersect sortedsets.- Specified by:
zInterin interfaceDefaultedRedisConnection- Specified by:
zInterin interfaceRedisZSetCommands- Parameters:
sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zInterWithScores
Description copied from interface:RedisZSetCommandsIntersect sortedsets.- Specified by:
zInterWithScoresin interfaceDefaultedRedisConnection- Specified by:
zInterWithScoresin interfaceRedisZSetCommands- Parameters:
sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zInterWithScores
Description copied from interface:RedisZSetCommandsIntersect sortedsets.- Specified by:
zInterWithScoresin interfaceDefaultedRedisConnection- Specified by:
zInterWithScoresin interfaceRedisZSetCommands- Parameters:
aggregate- must not be null.weights- must not be null.sets- must not be null.- Returns:
- See Also:
-
zInter
Description copied from interface:StringRedisConnectionIntersect sortedsets.- Specified by:
zInterin interfaceStringRedisConnection- Parameters:
sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zInterWithScores
Description copied from interface:StringRedisConnectionIntersect sortedsets.- Specified by:
zInterWithScoresin interfaceStringRedisConnection- Parameters:
sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zInterWithScores
@Nullable public Set<StringRedisConnection.StringTuple> zInterWithScores(Aggregate aggregate, Weights weights, String... sets) Description copied from interface:StringRedisConnectionIntersect sortedsets.- Specified by:
zInterWithScoresin interfaceStringRedisConnection- Parameters:
aggregate- must not be null.weights- must not be null.sets- must not be null.- Returns:
- See Also:
-
zInterStore
@Nullable public Long zInterStore(byte[] destKey, Aggregate aggregate, int[] weights, byte[]... sets) Description copied from interface:RedisZSetCommandsIntersect sortedsetsand store result in destinationdestKey.- Specified by:
zInterStorein interfaceDefaultedRedisConnection- Specified by:
zInterStorein interfaceRedisZSetCommands- Parameters:
destKey- must not be null.aggregate- must not be null.weights- must not be null.sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zInterStore
Description copied from interface:RedisZSetCommandsIntersect sortedsetsand store result in destinationdestKey.- Specified by:
zInterStorein interfaceDefaultedRedisConnection- Specified by:
zInterStorein interfaceRedisZSetCommands- Parameters:
destKey- must not be null.aggregate- must not be null.weights- must not be null.sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zInterStore
Description copied from interface:RedisZSetCommandsIntersect sortedsetsand store result in destinationdestKey.- Specified by:
zInterStorein interfaceDefaultedRedisConnection- Specified by:
zInterStorein interfaceRedisZSetCommands- Parameters:
destKey- must not be null.sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRange
Description copied from interface:RedisZSetCommandsGet elements betweenstartandendfrom sorted set.- Specified by:
zRangein interfaceDefaultedRedisConnection- Specified by:
zRangein interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- empty
Setwhen key does not exists or no members in range. null when used in pipeline / transaction. - See Also:
-
zRangeByScore
Description copied from interface:RedisZSetCommandsGet elements in range fromstarttoendwhere score is betweenminandmaxfrom sorted set.- Specified by:
zRangeByScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- empty
Setwhen key does not exists or no members in range. null when used in pipeline / transaction. - See Also:
-
zRangeByScore
Description copied from interface:RedisZSetCommandsGet elements where score is betweenRange#minandRange#maxfrom sorted set.- Specified by:
zRangeByScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.range- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRangeByScore
Description copied from interface:RedisZSetCommandsGet elements in range fromLimit#counttoLimit#offsetwhere score is betweenRange#minandRange#maxfrom sorted set.- Specified by:
zRangeByScorein interfaceDefaultedRedisConnection- Specified by:
zRangeByScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.range- must not be null.limit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRangeByScoreWithScores
Description copied from interface:RedisZSetCommands- Specified by:
zRangeByScoreWithScoresin interfaceRedisZSetCommands- Parameters:
key- must not be null.range- must not be null.- Returns:
- empty
Setwhen key does not exists or no members in range. null when used in pipeline / transaction. - See Also:
-
zRangeByScore
Description copied from interface:RedisZSetCommandsGet elements where score is betweenminandmaxfrom sorted set.- Specified by:
zRangeByScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- empty
Setwhen key does not exists or no members in range. null when used in pipeline / transaction. - See Also:
-
zRangeByScoreWithScores
public Set<Tuple> zRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count) Description copied from interface:RedisZSetCommands- Specified by:
zRangeByScoreWithScoresin interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- empty
Setwhen key does not exists or no members in range. null when used in pipeline / transaction. - See Also:
-
zRangeByScoreWithScores
Description copied from interface:RedisZSetCommandsGet set ofTuples in range fromLimit#offsettoLimit#offset + Limit#countwhere score is betweenRange#minandRange#maxfrom sorted set.- Specified by:
zRangeByScoreWithScoresin interfaceDefaultedRedisConnection- Specified by:
zRangeByScoreWithScoresin interfaceRedisZSetCommands- Parameters:
key- must not be null.range- must not be null.limit- must not be null.- Returns:
- empty
Setwhen key does not exists or no members in range. null when used in pipeline / transaction. - See Also:
-
zRangeByScoreWithScores
Description copied from interface:RedisZSetCommands- Specified by:
zRangeByScoreWithScoresin interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- empty
Setwhen key does not exists or no members in range. null when used in pipeline / transaction. - See Also:
-
zRangeWithScores
Description copied from interface:RedisZSetCommands- Specified by:
zRangeWithScoresin interfaceDefaultedRedisConnection- Specified by:
zRangeWithScoresin interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- empty
Setwhen key does not exists or no members in range. null when used in pipeline / transaction. - See Also:
-
zRevRangeByScore
Description copied from interface:RedisZSetCommandsGet elements in range fromstarttoendwhere score is betweenminandmaxfrom sorted set ordered high -> low.- Specified by:
zRevRangeByScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRevRangeByScore
Description copied from interface:RedisZSetCommandsGet elements where score is betweenRange#minandRange#maxfrom sorted set ordered from high to low.- Specified by:
zRevRangeByScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.range- must not be null.- Returns:
- empty
Setwhen key does not exists or no members in range. null when used in pipeline / transaction. - See Also:
-
zRevRangeByScore
Description copied from interface:RedisZSetCommandsGet elements where score is betweenminandmaxfrom sorted set ordered from high to low.- Specified by:
zRevRangeByScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- empty
Setwhen key does not exists or no members in range. null when used in pipeline / transaction. - See Also:
-
zRevRangeByScore
Description copied from interface:RedisZSetCommandsGet elements in range fromLimit#offsettoLimit#offset + Limit#countwhere score is betweenRange#minandRange#maxfrom sorted set ordered high -> low.- Specified by:
zRevRangeByScorein interfaceDefaultedRedisConnection- Specified by:
zRevRangeByScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.range- must not be null.limit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRevRangeByScoreWithScores
public Set<Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count) Description copied from interface:RedisZSetCommandsGet set ofTuplein range fromstarttoendwhere score is betweenminandmaxfrom sorted set ordered high -> low.- Specified by:
zRevRangeByScoreWithScoresin interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRevRangeByScoreWithScores
Description copied from interface:RedisZSetCommandsGet set ofTuplewhere score is betweenRange#minandRange#maxfrom sorted set ordered from high to low.- Specified by:
zRevRangeByScoreWithScoresin interfaceRedisZSetCommands- Parameters:
key- must not be null.range- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRevRangeByScoreWithScores
public Set<Tuple> zRevRangeByScoreWithScores(byte[] key, Range<? extends Number> range, Limit limit) Description copied from interface:RedisZSetCommandsGet set ofTuplein range fromLimit#offsettoLimit#countwhere score is betweenRange#minandRange#maxfrom sorted set ordered high -> low.- Specified by:
zRevRangeByScoreWithScoresin interfaceDefaultedRedisConnection- Specified by:
zRevRangeByScoreWithScoresin interfaceRedisZSetCommands- Parameters:
key- must not be null.range- must not be null.limit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRevRangeByScoreWithScores
Description copied from interface:RedisZSetCommands- Specified by:
zRevRangeByScoreWithScoresin interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- empty
Setwhen key does not exists or no members in range. null when used in pipeline / transaction. - See Also:
-
zRank
Description copied from interface:RedisZSetCommandsDetermine the index of element withvaluein a sorted set.- Specified by:
zRankin interfaceDefaultedRedisConnection- Specified by:
zRankin interfaceRedisZSetCommands- Parameters:
key- must not be null.value- the value. Must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRem
Description copied from interface:RedisZSetCommandsRemovevaluesfrom sorted set. Return number of removed elements.- Specified by:
zRemin interfaceDefaultedRedisConnection- Specified by:
zRemin interfaceRedisZSetCommands- Parameters:
key- must not be null.values- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRemRange
Description copied from interface:RedisZSetCommandsRemove elements in range betweenstartandendfrom sorted set withkey.- Specified by:
zRemRangein interfaceDefaultedRedisConnection- Specified by:
zRemRangein interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRemRangeByLex
Description copied from interface:RedisZSetCommandsRemove all elements between the lexicographicalRange.- Specified by:
zRemRangeByLexin interfaceDefaultedRedisConnection- Specified by:
zRemRangeByLexin interfaceRedisZSetCommands- Parameters:
key- must not be null.range- must not be null.- Returns:
- the number of elements removed, or null when used in pipeline / transaction.
- See Also:
-
zRemRangeByScore
Description copied from interface:RedisZSetCommandsRemove elements with scores betweenminandmaxfrom sorted set withkey.- Specified by:
zRemRangeByScorein interfaceDefaultedRedisConnection- Specified by:
zRemRangeByScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRemRangeByScore
Description copied from interface:RedisZSetCommandsRemove elements with scores betweenRange#minandRange#maxfrom sorted set withkey.- Specified by:
zRemRangeByScorein interfaceDefaultedRedisConnection- Specified by:
zRemRangeByScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.range- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRevRange
Description copied from interface:RedisZSetCommandsGet elements in range fromstarttoendfrom sorted set ordered from high to low.- Specified by:
zRevRangein interfaceDefaultedRedisConnection- Specified by:
zRevRangein interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- empty
Setwhen key does not exists or no members in range. null when used in pipeline / transaction. - See Also:
-
zRevRangeWithScores
Description copied from interface:RedisZSetCommands- Specified by:
zRevRangeWithScoresin interfaceDefaultedRedisConnection- Specified by:
zRevRangeWithScoresin interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- empty
Setwhen key does not exists or no members in range. null when used in pipeline / transaction. - See Also:
-
zRevRank
Description copied from interface:RedisZSetCommandsDetermine the index of element withvaluein a sorted set when scored high to low.- Specified by:
zRevRankin interfaceDefaultedRedisConnection- Specified by:
zRevRankin interfaceRedisZSetCommands- Parameters:
key- must not be null.value- the value.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zScore
Description copied from interface:RedisZSetCommandsGet the score of element withvaluefrom sorted set with keykey.- Specified by:
zScorein interfaceDefaultedRedisConnection- Specified by:
zScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.value- the value.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zMScore
Description copied from interface:RedisZSetCommandsGet the scores of elements withvaluesfrom sorted set with keykey.- Specified by:
zMScorein interfaceDefaultedRedisConnection- Specified by:
zMScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.values- the values.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zUnion
Description copied from interface:RedisZSetCommandsUnion sortedsets.- Specified by:
zUnionin interfaceDefaultedRedisConnection- Specified by:
zUnionin interfaceRedisZSetCommands- Parameters:
sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zUnionWithScores
Description copied from interface:RedisZSetCommandsUnion sortedsets.- Specified by:
zUnionWithScoresin interfaceDefaultedRedisConnection- Specified by:
zUnionWithScoresin interfaceRedisZSetCommands- Parameters:
sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zUnionWithScores
Description copied from interface:RedisZSetCommandsUnion sortedsets.- Specified by:
zUnionWithScoresin interfaceDefaultedRedisConnection- Specified by:
zUnionWithScoresin interfaceRedisZSetCommands- Parameters:
aggregate- must not be null.weights- must not be null.sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zUnion
Description copied from interface:StringRedisConnectionUnion sortedsets.- Specified by:
zUnionin interfaceStringRedisConnection- Parameters:
sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zUnionWithScores
Description copied from interface:StringRedisConnectionUnion sortedsets.- Specified by:
zUnionWithScoresin interfaceStringRedisConnection- Parameters:
sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zUnionWithScores
@Nullable public Set<StringRedisConnection.StringTuple> zUnionWithScores(Aggregate aggregate, Weights weights, String... sets) Description copied from interface:StringRedisConnectionUnion sortedsets.- Specified by:
zUnionWithScoresin interfaceStringRedisConnection- Parameters:
aggregate- must not be null.weights- must not be null.sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zUnionStore
Description copied from interface:RedisZSetCommandsUnion sortedsetsand store result in destinationdestKey.- Specified by:
zUnionStorein interfaceDefaultedRedisConnection- Specified by:
zUnionStorein interfaceRedisZSetCommands- Parameters:
destKey- must not be null.aggregate- must not be null.weights- must not be null.sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zUnionStore
@Nullable public Long zUnionStore(byte[] destKey, Aggregate aggregate, int[] weights, byte[]... sets) Description copied from interface:RedisZSetCommandsUnion sortedsetsand store result in destinationdestKey.- Specified by:
zUnionStorein interfaceDefaultedRedisConnection- Specified by:
zUnionStorein interfaceRedisZSetCommands- Parameters:
destKey- must not be null.aggregate- must not be null.weights- must not be null.sets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zUnionStore
Description copied from interface:RedisZSetCommandsUnion sortedsets.- Specified by:
zUnionStorein interfaceDefaultedRedisConnection- Specified by:
zUnionStorein interfaceRedisZSetCommandssets- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zLexCount
Description copied from interface:StringRedisConnectionCount number of elements within sorted set with value betweenRange#minandRange#maxapplying lexicographical ordering.- Specified by:
zLexCountin interfaceStringRedisConnection- Parameters:
key- must not be null.range- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
pExpire
Description copied from interface:RedisKeyCommandsSet time to live for givenkeyin milliseconds.- Specified by:
pExpirein interfaceDefaultedRedisConnection- Specified by:
pExpirein interfaceRedisKeyCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
pExpireAt
Description copied from interface:RedisKeyCommandsSet the expiration for givenkeyas a UNIX timestamp in milliseconds.- Specified by:
pExpireAtin interfaceDefaultedRedisConnection- Specified by:
pExpireAtin interfaceRedisKeyCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
pTtl
Description copied from interface:RedisKeyCommandsGet the precise time to live forkeyin milliseconds.- Specified by:
pTtlin interfaceDefaultedRedisConnection- Specified by:
pTtlin interfaceRedisKeyCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
pTtl
Description copied from interface:RedisKeyCommandsGet the precise time to live forkeyin and convert it to the givenTimeUnit.- Specified by:
pTtlin interfaceDefaultedRedisConnection- Specified by:
pTtlin interfaceRedisKeyCommands- Parameters:
key- must not be null.timeUnit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
dump
public byte[] dump(byte[] key) Description copied from interface:RedisKeyCommandsRetrieve serialized version of the value stored atkey.- Specified by:
dumpin interfaceDefaultedRedisConnection- Specified by:
dumpin interfaceRedisKeyCommands- Parameters:
key- must not be null.- Returns:
- null if key does not exist or when used in pipeline / transaction.
- See Also:
-
restore
public void restore(byte[] key, long ttlInMillis, byte[] serializedValue, boolean replace) Description copied from interface:RedisKeyCommands- Specified by:
restorein interfaceDefaultedRedisConnection- Specified by:
restorein interfaceRedisKeyCommands- Parameters:
key- must not be null.serializedValue- must not be null.replace- use true to replace a potentially existing value instead of erroring.- See Also:
-
scriptFlush
public void scriptFlush()Description copied from interface:RedisScriptingCommandsFlush lua script cache.- Specified by:
scriptFlushin interfaceDefaultedRedisConnection- Specified by:
scriptFlushin interfaceRedisScriptingCommands- See Also:
-
scriptKill
public void scriptKill()Description copied from interface:RedisScriptingCommandsKill current lua script execution.- Specified by:
scriptKillin interfaceDefaultedRedisConnection- Specified by:
scriptKillin interfaceRedisScriptingCommands- See Also:
-
scriptLoad
Description copied from interface:RedisScriptingCommandsLoad lua script into scripts cache, without executing it.
Execute the script by callingRedisScriptingCommands.evalSha(byte[], ReturnType, int, byte[]...).- Specified by:
scriptLoadin interfaceDefaultedRedisConnection- Specified by:
scriptLoadin interfaceRedisScriptingCommands- Parameters:
script- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
scriptExists
Description copied from interface:RedisScriptingCommandsCheck if givenscriptShasexist in script cache.- Specified by:
scriptExistsin interfaceDefaultedRedisConnection- Specified by:
scriptExistsin interfaceRedisScriptingCommands- Returns:
- one entry per given scriptSha in returned
Listor null when used in pipeline / transaction. - See Also:
-
eval
Description copied from interface:RedisScriptingCommandsEvaluate givenscript.- Specified by:
evalin interfaceDefaultedRedisConnection- Specified by:
evalin interfaceRedisScriptingCommands- Parameters:
script- must not be null.returnType- must not be null.keysAndArgs- must not be null.- Returns:
- script result. null when used in pipeline / transaction.
- See Also:
-
evalSha
Description copied from interface:RedisScriptingCommandsEvaluate givenscriptSha.- Specified by:
evalShain interfaceDefaultedRedisConnection- Specified by:
evalShain interfaceRedisScriptingCommands- Parameters:
scriptSha1- must not be null.returnType- must not be null.keysAndArgs- must not be null.- Returns:
- script result. null when used in pipeline / transaction.
- See Also:
-
evalSha
Description copied from interface:RedisScriptingCommandsEvaluate givenscriptSha.- Specified by:
evalShain interfaceDefaultedRedisConnection- Specified by:
evalShain interfaceRedisScriptingCommands- Parameters:
scriptSha1- must not be null.returnType- must not be null.keysAndArgs- must not be null.- Returns:
- script result. null when used in pipeline / transaction.
- See Also:
-
append
Description copied from interface:StringRedisConnectionAppend avaluetokey.- Specified by:
appendin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
bLPop
Description copied from interface:StringRedisConnectionRemoves and returns first element from lists stored atkeys(see:DefaultedRedisConnection.lPop(byte[])).
Blocks connection until element available ortimeoutreached.- Specified by:
bLPopin interfaceStringRedisConnectionkeys- must not be null.- Returns:
- See Also:
-
bRPop
Description copied from interface:StringRedisConnectionRemoves and returns last element from lists stored atkeys(see:DefaultedRedisConnection.rPop(byte[])).
Blocks connection until element available ortimeoutreached.- Specified by:
bRPopin interfaceStringRedisConnectionkeys- must not be null.- Returns:
- See Also:
-
bRPopLPush
Description copied from interface:StringRedisConnectionRemove the last element from list atsrcKey, append it todstKeyand return its value (seeDefaultedRedisConnection.rPopLPush(byte[], byte[])).
Blocks connection until element available ortimeoutreached.- Specified by:
bRPopLPushin interfaceStringRedisConnectionsrcKey- must not be null.dstKey- must not be null.- Returns:
- See Also:
-
copy
Description copied from interface:StringRedisConnectionCopy givensourceKeytotargetKey.- Specified by:
copyin interfaceStringRedisConnection- Parameters:
sourceKey- must not be null.targetKey- must not be null.replace- whether to replace existing keys.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
decr
Description copied from interface:StringRedisConnectionDecrement an integer value stored as string value ofkeyby 1.- Specified by:
decrin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
decrBy
Description copied from interface:StringRedisConnectionDecrement an integer value stored as string value ofkeybyvalue.- Specified by:
decrByin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
del
Description copied from interface:StringRedisConnectionDelete givenkeys.- Specified by:
delin interfaceStringRedisConnection- Parameters:
keys- must not be null.- Returns:
- The number of keys that were removed.
- See Also:
-
unlink
Description copied from interface:StringRedisConnectionUnlink thekeysfrom the keyspace. Unlike withStringRedisConnection.del(String...)the actual memory reclaiming here happens asynchronously.- Specified by:
unlinkin interfaceStringRedisConnection- Parameters:
keys- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
echo
Description copied from interface:StringRedisConnectionReturnsmessagevia server roundtrip.- Specified by:
echoin interfaceStringRedisConnection- Parameters:
message- the message to echo.- Returns:
- See Also:
-
exists
Description copied from interface:StringRedisConnectionDetermine if givenkeyexists.- Specified by:
existsin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
expire
Description copied from interface:StringRedisConnectionSet time to live for givenkeyin seconds.- Specified by:
expirein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
expireAt
Description copied from interface:StringRedisConnectionSet the expiration for givenkeyas a UNIX timestamp.- Specified by:
expireAtin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
get
Description copied from interface:StringRedisConnectionGet the value ofkey.- Specified by:
getin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
getBit
Description copied from interface:StringRedisConnectionGet the bit value atoffsetof value atkey.- Specified by:
getBitin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
getRange
Description copied from interface:StringRedisConnectionGet a substring of value ofkeybetweenstartandend.- Specified by:
getRangein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
getSet
Description copied from interface:StringRedisConnectionSetvalueofkeyand return its old value.- Specified by:
getSetin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
hDel
Description copied from interface:StringRedisConnectionDelete given hashfields.- Specified by:
hDelin interfaceStringRedisConnection- Parameters:
key- must not be null.fields- must not be null.- Returns:
- See Also:
-
hExists
Description copied from interface:StringRedisConnectionDetermine if given hashfieldexists.- Specified by:
hExistsin interfaceStringRedisConnection- Parameters:
key- must not be null.field- must not be null.- Returns:
- See Also:
-
hGet
Description copied from interface:StringRedisConnectionGet value for givenfieldfrom hash atkey.- Specified by:
hGetin interfaceStringRedisConnection- Parameters:
key- must not be null.field- must not be null.- Returns:
- See Also:
-
hGetAll
Description copied from interface:StringRedisConnectionGet entire hash stored atkey.- Specified by:
hGetAllin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
hIncrBy
Description copied from interface:StringRedisConnectionIncrementvalueof a hashfieldby the givendelta.- Specified by:
hIncrByin interfaceStringRedisConnection- Parameters:
key- must not be null.field- must not be null.- Returns:
- See Also:
-
hIncrBy
Description copied from interface:StringRedisConnectionIncrementvalueof a hashfieldby the givendelta.- Specified by:
hIncrByin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
hRandField
Description copied from interface:RedisHashCommandsReturn a random field from the hash stored atkey.- Specified by:
hRandFieldin interfaceDefaultedRedisConnection- Specified by:
hRandFieldin interfaceRedisHashCommands- Parameters:
key- must not be null.- Returns:
- null if key does not exist or when used in pipeline / transaction.
- See Also:
-
hRandFieldWithValues
Description copied from interface:RedisHashCommandsReturn a random field from the hash along with its value stored atkey.- Specified by:
hRandFieldWithValuesin interfaceDefaultedRedisConnection- Specified by:
hRandFieldWithValuesin interfaceRedisHashCommands- Parameters:
key- must not be null.- Returns:
- null if key does not exist or when used in pipeline / transaction.
- See Also:
-
hRandField
Description copied from interface:RedisHashCommandsReturn a random field from the hash stored atkey. If the providedcountargument is positive, return a list of distinct fields, capped either atcountor the hash size. Ifcountis negative, the behavior changes and the command is allowed to return the same field multiple times. In this case, the number of returned fields is the absolute value of the specified count.- Specified by:
hRandFieldin interfaceDefaultedRedisConnection- Specified by:
hRandFieldin interfaceRedisHashCommands- Parameters:
key- must not be null.count- number of fields to return.- Returns:
- null if key does not exist or when used in pipeline / transaction.
- See Also:
-
hRandFieldWithValues
Description copied from interface:RedisHashCommandsReturn a random field from the hash along with its value stored atkey. If the providedcountargument is positive, return a list of distinct fields, capped either atcountor the hash size. Ifcountis negative, the behavior changes and the command is allowed to return the same field multiple times. In this case, the number of returned fields is the absolute value of the specified count.- Specified by:
hRandFieldWithValuesin interfaceDefaultedRedisConnection- Specified by:
hRandFieldWithValuesin interfaceRedisHashCommands- Parameters:
key- must not be null.count- number of fields to return.- Returns:
- null if key does not exist or when used in pipeline / transaction.
- See Also:
-
hRandField
Description copied from interface:StringRedisConnectionReturn a random field from the hash stored atkey.- Specified by:
hRandFieldin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- null if key does not exist or when used in pipeline / transaction.
- See Also:
-
hRandFieldWithValues
Description copied from interface:StringRedisConnectionReturn a random field from the hash along with its value stored atkey.- Specified by:
hRandFieldWithValuesin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- null if key does not exist or when used in pipeline / transaction.
- See Also:
-
hRandField
Description copied from interface:StringRedisConnectionReturn a random field from the hash stored atkey. If the providedcountargument is positive, return a list of distinct fields, capped either atcountor the hash size. Ifcountis negative, the behavior changes and the command is allowed to return the same field multiple times. In this case, the number of returned fields is the absolute value of the specified count.- Specified by:
hRandFieldin interfaceStringRedisConnection- Parameters:
key- must not be null.count- number of fields to return.- Returns:
- null if key does not exist or when used in pipeline / transaction.
- See Also:
-
hRandFieldWithValues
Description copied from interface:StringRedisConnectionReturn a random field from the hash along with its value stored atkey. If the providedcountargument is positive, return a list of distinct fields, capped either atcountor the hash size. Ifcountis negative, the behavior changes and the command is allowed to return the same field multiple times. In this case, the number of returned fields is the absolute value of the specified count.- Specified by:
hRandFieldWithValuesin interfaceStringRedisConnection- Parameters:
key- must not be null.count- number of fields to return.- Returns:
- null if key does not exist or when used in pipeline / transaction.
- See Also:
-
hKeys
Description copied from interface:StringRedisConnectionGet key set (fields) of hash atkey.- Specified by:
hKeysin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
hLen
Description copied from interface:StringRedisConnectionGet size of hash atkey.- Specified by:
hLenin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
hMGet
Description copied from interface:StringRedisConnectionGet values for givenfieldsfrom hash atkey.- Specified by:
hMGetin interfaceStringRedisConnection- Parameters:
key- must not be null.fields- must not be null.- Returns:
- See Also:
-
hMSet
Description copied from interface:StringRedisConnectionSet multiple hash fields to multiple values using data provided inhashes- Specified by:
hMSetin interfaceStringRedisConnection- Parameters:
key- must not be null.hashes- must not be null.- See Also:
-
hSet
Description copied from interface:StringRedisConnectionSet thevalueof a hashfield.- Specified by:
hSetin interfaceStringRedisConnection- Parameters:
key- must not be null.field- must not be null.- Returns:
- See Also:
-
hSetNX
Description copied from interface:StringRedisConnectionSet thevalueof a hashfieldonly iffielddoes not exist.- Specified by:
hSetNXin interfaceStringRedisConnection- Parameters:
key- must not be null.field- must not be null.- Returns:
- See Also:
-
hVals
Description copied from interface:StringRedisConnectionGet entry set (values) of hash atfield.- Specified by:
hValsin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
incr
Description copied from interface:StringRedisConnectionIncrement an integer value stored as string value ofkeyby 1.- Specified by:
incrin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
incrBy
Description copied from interface:StringRedisConnectionIncrement an integer value stored ofkeybydelta.- Specified by:
incrByin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
incrBy
Description copied from interface:StringRedisConnectionIncrement a floating point number value ofkeybydelta.- Specified by:
incrByin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
keys
Description copied from interface:StringRedisConnectionFind all keys matching the givenpattern.- Specified by:
keysin interfaceStringRedisConnection- Parameters:
pattern- must not be null.- Returns:
- See Also:
-
lIndex
Description copied from interface:StringRedisConnectionGet element atindexform list atkey.- Specified by:
lIndexin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
lInsert
Description copied from interface:StringRedisConnectionInsertvalueRedisListCommands.Position.BEFOREorRedisListCommands.Position.AFTERexistingpivotforkey.- Specified by:
lInsertin interfaceStringRedisConnection- Parameters:
key- must not be null.where- must not be null.- Returns:
- See Also:
-
lLen
Description copied from interface:StringRedisConnectionGet the size of list stored atkey.- Specified by:
lLenin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
lPop
Description copied from interface:StringRedisConnectionRemoves and returns first element in list stored atkey.- Specified by:
lPopin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
lPop
Description copied from interface:StringRedisConnectionRemoves and returns first elements in list stored atkey.- Specified by:
lPopin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
lPos
Description copied from interface:StringRedisConnectionReturns the index of matching elements inside the list stored at given key.
Requires Redis 6.0.6 or newer.- Specified by:
lPosin interfaceStringRedisConnection- Parameters:
key- must not be null.element- must not be null.rank- specifies the "rank" of the first element to return, in case there are multiple matches. A rank of 1 means to return the first match, 2 to return the second match, and so forth.count- number of matches to return.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
lPush
Description copied from interface:StringRedisConnectionPrependvaluestokey.- Specified by:
lPushin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
lPushX
Description copied from interface:StringRedisConnectionPrependvaluestokeyonly if the list exists.- Specified by:
lPushXin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
lRange
Description copied from interface:StringRedisConnectionGet elements betweenstartandendfrom list atkey.- Specified by:
lRangein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
lRem
Description copied from interface:StringRedisConnectionRemoves the firstcountoccurrences ofvaluefrom the list stored atkey.- Specified by:
lRemin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
lSet
Description copied from interface:StringRedisConnectionSet thevaluelist element atindex.- Specified by:
lSetin interfaceStringRedisConnection- Parameters:
key- must not be null.- See Also:
-
lTrim
Description copied from interface:StringRedisConnectionTrim list atkeyto elements betweenstartandend.- Specified by:
lTrimin interfaceStringRedisConnection- Parameters:
key- must not be null.- See Also:
-
mGet
Description copied from interface:StringRedisConnectionGet multiplekeys. Values are in the order of the requested keys.- Specified by:
mGetin interfaceStringRedisConnection- Parameters:
keys- must not be null.- Returns:
- See Also:
-
mSetNXString
Description copied from interface:StringRedisConnectionSet multiple keys to multiple values using key-value pairs provided intupleonly if the provided key does not exist.- Specified by:
mSetNXStringin interfaceStringRedisConnection- Parameters:
tuple- must not be null.- See Also:
-
mSetString
Description copied from interface:StringRedisConnectionSet multiple keys to multiple values using key-value pairs provided intuple.- Specified by:
mSetStringin interfaceStringRedisConnection- Parameters:
tuple- must not be null.- See Also:
-
persist
Description copied from interface:StringRedisConnectionRemove the expiration from givenkey.- Specified by:
persistin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
move
Description copied from interface:StringRedisConnectionMove givenkeyto database withindex.- Specified by:
movein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
pSubscribe
Description copied from interface:StringRedisConnectionSubscribes the connection to all channels matching the given patterns. Once subscribed, a connection enters listening mode and can only subscribe to other channels or unsubscribe. No other commands are accepted until the connection is unsubscribed.Note that this operation is blocking and the current thread starts waiting for new messages immediately.
- Specified by:
pSubscribein interfaceStringRedisConnection- Parameters:
listener- message listener, must not be null.patterns- channel name patterns, must not be null.- See Also:
-
publish
Description copied from interface:StringRedisConnectionPublishes the given message to the given channel.- Specified by:
publishin interfaceStringRedisConnection- Parameters:
channel- the channel to publish to, must not be null.message- message to publish- Returns:
- the number of clients that received the message
- See Also:
-
rename
Description copied from interface:StringRedisConnectionRename keyoldKeytonewKey.- Specified by:
renamein interfaceStringRedisConnection- Parameters:
oldKey- must not be null.newKey- must not be null.- See Also:
-
renameNX
Description copied from interface:StringRedisConnectionRename keyoldKeytonewKeyonly ifnewKeydoes not exist.- Specified by:
renameNXin interfaceStringRedisConnection- Parameters:
oldKey- must not be null.newKey- must not be null.- Returns:
- See Also:
-
rPop
Description copied from interface:StringRedisConnectionRemoves and returns last element in list stored atkey.- Specified by:
rPopin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
rPop
Description copied from interface:StringRedisConnectionRemoves and returns last elements in list stored atkey.- Specified by:
rPopin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
rPopLPush
Description copied from interface:StringRedisConnectionRemove the last element from list atsrcKey, append it todstKeyand return its value.- Specified by:
rPopLPushin interfaceStringRedisConnection- Parameters:
srcKey- must not be null.dstKey- must not be null.- Returns:
- See Also:
-
rPush
Description copied from interface:StringRedisConnectionAppendvaluestokey.- Specified by:
rPushin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
rPushX
Description copied from interface:StringRedisConnectionAppendvaluestokeyonly if the list exists.- Specified by:
rPushXin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
sAdd
Description copied from interface:StringRedisConnectionAdd givenvaluesto set atkey.- Specified by:
sAddin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
sCard
Description copied from interface:StringRedisConnectionGet size of set atkey.- Specified by:
sCardin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
sDiff
Description copied from interface:StringRedisConnectionDiff all sets for givenkeys.- Specified by:
sDiffin interfaceStringRedisConnection- Parameters:
keys- must not be null.- Returns:
- See Also:
-
sDiffStore
Description copied from interface:StringRedisConnectionDiff all sets for givenkeysand store result indestKey.- Specified by:
sDiffStorein interfaceStringRedisConnection- Parameters:
destKey- must not be null.keys- must not be null.- Returns:
- See Also:
-
set
Description copied from interface:StringRedisConnectionSetvalueforkey.- Specified by:
setin interfaceStringRedisConnection- Parameters:
key- must not be null.value- must not be null.- See Also:
-
set
public Boolean set(String key, String value, Expiration expiration, RedisStringCommands.SetOption option) Description copied from interface:StringRedisConnectionSetvalueforkeyapplying timeouts fromexpirationif set and inserting/updating values depending onoption.- Specified by:
setin interfaceStringRedisConnection- Parameters:
key- must not be null.value- must not be null.expiration- can be null. Defaulted toExpiration.persistent(). UseExpiration.keepTtl()to keep the existing expiration.option- can be null. Defaulted toRedisStringCommands.SetOption.UPSERT.- See Also:
-
setBit
Description copied from interface:StringRedisConnectionSets the bit atoffsetin value stored atkey.- Specified by:
setBitin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- the original bit value stored at
offset. - See Also:
-
setEx
Description copied from interface:StringRedisConnectionSet thevalueand expiration insecondsforkey.- Specified by:
setExin interfaceStringRedisConnection- Parameters:
key- must not be null.value- must not be null.- See Also:
-
pSetEx
Description copied from interface:StringRedisConnectionSet thevalueand expiration inmillisecondsforkey.- Specified by:
pSetExin interfaceStringRedisConnection- Parameters:
key- must not be null.value- must not be null.- See Also:
-
setNX
Description copied from interface:StringRedisConnectionSetvalueforkey, only ifkeydoes not exist.- Specified by:
setNXin interfaceStringRedisConnection- Parameters:
key- must not be null.value- must not be null.- Returns:
- See Also:
-
setRange
Description copied from interface:StringRedisConnectionOverwrite parts ofkeystarting at the specifiedoffsetwith givenvalue.- Specified by:
setRangein interfaceStringRedisConnection- Parameters:
key- must not be null.- See Also:
-
sInter
Description copied from interface:StringRedisConnectionReturns the members intersecting all given sets atkeys.- Specified by:
sInterin interfaceStringRedisConnection- Parameters:
keys- must not be null.- Returns:
- See Also:
-
sInterStore
Description copied from interface:StringRedisConnectionIntersect all given sets atkeysand store result indestKey.- Specified by:
sInterStorein interfaceStringRedisConnection- Parameters:
destKey- must not be null.keys- must not be null.- Returns:
- See Also:
-
sIsMember
Description copied from interface:StringRedisConnectionCheck if set atkeycontainsvalue.- Specified by:
sIsMemberin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
sMIsMember
Description copied from interface:StringRedisConnectionCheck if set atkeycontains one or morevalues.- Specified by:
sMIsMemberin interfaceStringRedisConnection- Parameters:
key- must not be null.values- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
sMembers
Description copied from interface:StringRedisConnectionGet all elements of set atkey.- Specified by:
sMembersin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
sMove
Description copied from interface:StringRedisConnectionMovevaluefromsrcKeytodestKey- Specified by:
sMovein interfaceStringRedisConnection- Parameters:
srcKey- must not be null.destKey- must not be null.- Returns:
- See Also:
-
sort
Description copied from interface:StringRedisConnectionSort the elements forkeyand store result instoreKey.- Specified by:
sortin interfaceStringRedisConnection- Parameters:
key- must not be null.params- must not be null.storeKey- must not be null.- Returns:
- See Also:
-
sort
Description copied from interface:StringRedisConnectionSort the elements forkey.- Specified by:
sortin interfaceStringRedisConnection- Parameters:
key- must not be null.params- must not be null.- Returns:
- See Also:
-
encodingOf
Description copied from interface:StringRedisConnectionGet the type of internal representation used for storing the value at the givenkey.- Specified by:
encodingOfin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- null if key does not exist or when used in pipeline / transaction.
-
idletime
Description copied from interface:StringRedisConnectionGet theDurationsince the object stored at the givenkeyis idle.- Specified by:
idletimein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- null if key does not exist or when used in pipeline / transaction.
-
refcount
Description copied from interface:StringRedisConnectionGet the number of references of the value associated with the specifiedkey.- Specified by:
refcountin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- null if key does not exist or when used in pipeline / transaction.
-
sPop
Description copied from interface:StringRedisConnectionRemove and return a random member from set atkey.- Specified by:
sPopin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
sPop
Description copied from interface:StringRedisConnectionRemove and returncountrandom members from set atkey.- Specified by:
sPopin interfaceStringRedisConnection- Parameters:
key- must not be null.count- the number of random members to return.- Returns:
- empty
Listif key does not exist. - See Also:
-
sRandMember
Description copied from interface:StringRedisConnectionGet random element from set atkey.- Specified by:
sRandMemberin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
sRandMember
Description copied from interface:StringRedisConnectionGetcountrandom elements from set atkey.- Specified by:
sRandMemberin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
sRem
Description copied from interface:StringRedisConnectionRemove givenvaluesfrom set atkeyand return the number of removed elements.- Specified by:
sRemin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
strLen
Description copied from interface:StringRedisConnectionGet the length of the value stored atkey.- Specified by:
strLenin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
bitCount
Description copied from interface:StringRedisConnectionCount the number of set bits (population counting) in value stored atkey.- Specified by:
bitCountin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
bitCount
Description copied from interface:StringRedisConnectionCount the number of set bits (population counting) of value stored atkeybetweenstartandend.- Specified by:
bitCountin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
bitOp
Description copied from interface:StringRedisConnectionPerform bitwise operations between strings.- Specified by:
bitOpin interfaceStringRedisConnection- Parameters:
op- must not be null.destination- must not be null.keys- must not be null.- Returns:
- See Also:
-
bitPos
Description copied from interface:StringRedisConnectionReturn the position of the first bit set to givenbitin a string.Rangestart and end can contain negative values in order to index bytes starting from the end of the string, where -1 is the last byte, -2 is the penultimate.- Specified by:
bitPosin interfaceStringRedisConnection- Parameters:
key- the key holding the actual String.bit- the bit value to look for.range- must not be null. UseRedisZSetCommands.Range.unbounded()to not limit search.- Returns:
- null when used in pipeline / transaction. The position of the first bit set to 1 or 0 according to the request.
- See Also:
-
subscribe
Description copied from interface:StringRedisConnectionSubscribes the connection to the given channels. Once subscribed, a connection enters listening mode and can only subscribe to other channels or unsubscribe. No other commands are accepted until the connection is unsubscribed.Note that this operation is blocking and the current thread starts waiting for new messages immediately.
- Specified by:
subscribein interfaceStringRedisConnection- Parameters:
listener- message listener, must not be null.channels- channel names, must not be null.- See Also:
-
sUnion
Description copied from interface:StringRedisConnectionUnion all sets at givenkeys.- Specified by:
sUnionin interfaceStringRedisConnection- Parameters:
keys- must not be null.- Returns:
- See Also:
-
sUnionStore
Description copied from interface:StringRedisConnectionUnion all sets at givenkeysand store result indestKey.- Specified by:
sUnionStorein interfaceStringRedisConnection- Parameters:
destKey- must not be null.keys- must not be null.- Returns:
- See Also:
-
ttl
Description copied from interface:StringRedisConnectionGet the time to live forkeyin seconds.- Specified by:
ttlin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
ttl
Description copied from interface:StringRedisConnectionGet the time to live forkeyin and convert it to the givenTimeUnit.- Specified by:
ttlin interfaceStringRedisConnection- Parameters:
key- must not be null.timeUnit- must not be null.- Returns:
- See Also:
-
type
Description copied from interface:StringRedisConnectionDetermine the type stored atkey.- Specified by:
typein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
touch
Description copied from interface:StringRedisConnectionAlter the last access time of givenkey(s).- Specified by:
touchin interfaceStringRedisConnection- Parameters:
keys- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zAdd
Description copied from interface:StringRedisConnectionAddvalueto a sorted set atkey, or update itsscoreif it already exists.- Specified by:
zAddin interfaceStringRedisConnection- Parameters:
key- must not be null.score- the score.value- the value.- Returns:
- See Also:
-
zAdd
Description copied from interface:StringRedisConnection- Specified by:
zAddin interfaceStringRedisConnection- Parameters:
key- must not be null.score- must not be null.value- must not be null.args- must not be null useRedisZSetCommands.ZAddArgs.empty()instead.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zAdd
Description copied from interface:StringRedisConnectionAddtuplesto a sorted set atkey, or update itsscoreif it already exists.- Specified by:
zAddin interfaceStringRedisConnection- Parameters:
key- must not be null.tuples- the tuples.- Returns:
- See Also:
-
zAdd
public Long zAdd(String key, Set<StringRedisConnection.StringTuple> tuples, RedisZSetCommands.ZAddArgs args) Description copied from interface:StringRedisConnection- Specified by:
zAddin interfaceStringRedisConnection- Parameters:
key- must not be null.tuples- must not be null.args- must not be null useRedisZSetCommands.ZAddArgs.empty()instead.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zCard
Description copied from interface:StringRedisConnectionGet the size of sorted set withkey.- Specified by:
zCardin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zCount
Description copied from interface:StringRedisConnectionCount number of elements within sorted set with scores betweenminandmax.- Specified by:
zCountin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zLexCount
Description copied from interface:RedisZSetCommandsCount number of elements within sorted set with value betweenRange#minandRange#maxapplying lexicographical ordering.- Specified by:
zLexCountin interfaceDefaultedRedisConnection- Specified by:
zLexCountin interfaceRedisZSetCommands- Parameters:
key- must not be null.range- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zPopMin
Description copied from interface:RedisZSetCommandsRemove and return the value with its score having the lowest score from sorted set atkey.- Specified by:
zPopMinin interfaceDefaultedRedisConnection- Specified by:
zPopMinin interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- null when the sorted set is empty or used in pipeline / transaction.
- See Also:
-
zPopMin
Description copied from interface:StringRedisConnectionRemove and return the value with its score having the lowest score from sorted set atkey.- Specified by:
zPopMinin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- null when the sorted set is empty or used in pipeline / transaction.
- See Also:
-
zPopMin
Description copied from interface:RedisZSetCommandsRemove and returncountvalues with their score having the lowest score from sorted set atkey.- Specified by:
zPopMinin interfaceDefaultedRedisConnection- Specified by:
zPopMinin interfaceRedisZSetCommands- Parameters:
key- must not be null.count- number of elements to pop.- Returns:
- null when the sorted set is empty or used in pipeline / transaction.
- See Also:
-
zPopMin
Description copied from interface:StringRedisConnectionRemove and returncountvalues with their score having the lowest score from sorted set atkey.- Specified by:
zPopMinin interfaceStringRedisConnection- Parameters:
key- must not be null.count- number of elements to pop.- Returns:
- null when the sorted set is empty or used in pipeline / transaction.
- See Also:
-
bZPopMin
Description copied from interface:RedisZSetCommandsRemove and return the value with its score having the lowest score from sorted set atkey.
Blocks connection until element available ortimeoutreached.- Specified by:
bZPopMinin interfaceDefaultedRedisConnection- Specified by:
bZPopMinin interfaceRedisZSetCommands- Parameters:
key- must not be null.unit- must not be null.- Returns:
- can be null.
- See Also:
-
bZPopMin
@Nullable public StringRedisConnection.StringTuple bZPopMin(String key, long timeout, TimeUnit unit) Description copied from interface:StringRedisConnectionRemove and return the value with its score having the lowest score from sorted set atkey. Blocks connection until element available ortimeoutreached.- Specified by:
bZPopMinin interfaceStringRedisConnection- Parameters:
key- must not be null.unit- must not be null.- Returns:
- can be null.
- See Also:
-
zPopMax
Description copied from interface:RedisZSetCommandsRemove and return the value with its score having the highest score from sorted set atkey.- Specified by:
zPopMaxin interfaceDefaultedRedisConnection- Specified by:
zPopMaxin interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- null when the sorted set is empty or used in pipeline / transaction.
- See Also:
-
zPopMax
Description copied from interface:StringRedisConnectionRemove and return the value with its score having the highest score from sorted set atkey.- Specified by:
zPopMaxin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- null when the sorted set is empty or used in pipeline / transaction.
- See Also:
-
zPopMax
Description copied from interface:RedisZSetCommandsRemove and returncountvalues with their score having the highest score from sorted set atkey.- Specified by:
zPopMaxin interfaceDefaultedRedisConnection- Specified by:
zPopMaxin interfaceRedisZSetCommands- Parameters:
key- must not be null.count- number of elements to pop.- Returns:
- null when the sorted set is empty or used in pipeline / transaction.
- See Also:
-
zPopMax
Description copied from interface:StringRedisConnectionRemove and returncountvalues with their score having the highest score from sorted set atkey.- Specified by:
zPopMaxin interfaceStringRedisConnection- Parameters:
key- must not be null.count- number of elements to pop.- Returns:
- null when the sorted set is empty or used in pipeline / transaction.
- See Also:
-
bZPopMax
Description copied from interface:RedisZSetCommandsRemove and return the value with its score having the highest score from sorted set atkey.
Blocks connection until element available ortimeoutreached.- Specified by:
bZPopMaxin interfaceDefaultedRedisConnection- Specified by:
bZPopMaxin interfaceRedisZSetCommands- Parameters:
key- must not be null.unit- must not be null.- Returns:
- can be null.
- See Also:
-
bZPopMax
@Nullable public StringRedisConnection.StringTuple bZPopMax(String key, long timeout, TimeUnit unit) Description copied from interface:StringRedisConnectionRemove and return the value with its score having the highest score from sorted set atkey. Blocks connection until element available ortimeoutreached.- Specified by:
bZPopMaxin interfaceStringRedisConnection- Parameters:
key- must not be null.unit- must not be null.- Returns:
- can be null.
- See Also:
-
zIncrBy
Description copied from interface:StringRedisConnectionIncrement the score of element withvaluein sorted set byincrement.- Specified by:
zIncrByin interfaceStringRedisConnection- Parameters:
key- must not be null.value- the value.- Returns:
- See Also:
-
zInterStore
Description copied from interface:StringRedisConnectionIntersect sortedsetsand store result in destinationkey.- Specified by:
zInterStorein interfaceStringRedisConnection- Parameters:
destKey- must not be null.aggregate- must not be null.sets- must not be null.- Returns:
- See Also:
-
zInterStore
Description copied from interface:StringRedisConnectionIntersect sortedsetsand store result in destinationkey.- Specified by:
zInterStorein interfaceStringRedisConnection- Parameters:
destKey- must not be null.sets- must not be null.- Returns:
- See Also:
-
zRandMember
public byte[] zRandMember(byte[] key) Description copied from interface:RedisZSetCommandsGet random element from sorted set atkey.- Specified by:
zRandMemberin interfaceDefaultedRedisConnection- Specified by:
zRandMemberin interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- can be null.
- See Also:
-
zRandMember
Description copied from interface:RedisZSetCommandsGetcountrandom elements from sorted set atkey.- Specified by:
zRandMemberin interfaceDefaultedRedisConnection- Specified by:
zRandMemberin interfaceRedisZSetCommands- Parameters:
key- must not be null.count- if the providedcountargument is positive, return a list of distinct fields, capped either atcountor the set size. Ifcountis negative, the behavior changes and the command is allowed to return the same value multiple times. In this case, the number of returned values is the absolute value of the specified count.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRandMemberWithScore
Description copied from interface:RedisZSetCommandsGet random element from sorted set atkey.- Specified by:
zRandMemberWithScorein interfaceDefaultedRedisConnection- Specified by:
zRandMemberWithScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- can be null.
- See Also:
-
zRandMemberWithScore
Description copied from interface:RedisZSetCommandsGetcountrandom elements from sorted set atkey.- Specified by:
zRandMemberWithScorein interfaceDefaultedRedisConnection- Specified by:
zRandMemberWithScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.count- if the providedcountargument is positive, return a list of distinct fields, capped either atcountor the set size. Ifcountis negative, the behavior changes and the command is allowed to return the same value multiple times. In this case, the number of returned values is the absolute value of the specified count.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRandMember
Description copied from interface:StringRedisConnectionGet random element from sorted set atkey.- Specified by:
zRandMemberin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- can be null.
- See Also:
-
zRandMember
Description copied from interface:StringRedisConnectionGetcountrandom elements from sorted set atkey.- Specified by:
zRandMemberin interfaceStringRedisConnection- Parameters:
key- must not be null.count- if the providedcountargument is positive, return a list of distinct fields, capped either atcountor the set size. Ifcountis negative, the behavior changes and the command is allowed to return the same value multiple times. In this case, the number of returned values is the absolute value of the specified count.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRandMemberWithScore
Description copied from interface:StringRedisConnectionGet random element from sorted set atkey.- Specified by:
zRandMemberWithScorein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- can be null.
- See Also:
-
zRandMemberWithScores
Description copied from interface:StringRedisConnectionGetcountrandom elements from sorted set atkey.- Specified by:
zRandMemberWithScoresin interfaceStringRedisConnection- Parameters:
key- must not be null.count- if the providedcountargument is positive, return a list of distinct fields, capped either atcountor the set size. Ifcountis negative, the behavior changes and the command is allowed to return the same value multiple times. In this case, the number of returned values is the absolute value of the specified count.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRange
Description copied from interface:StringRedisConnectionGet elements betweenstartandendfrom sorted set.- Specified by:
zRangein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zRangeByScore
Description copied from interface:StringRedisConnectionGet elements in range fromstarttoendwhere score is betweenminandmaxfrom sorted set.- Specified by:
zRangeByScorein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zRangeByScore
Description copied from interface:StringRedisConnectionGet elements where score is betweenminandmaxfrom sorted set.- Specified by:
zRangeByScorein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zRangeByScoreWithScores
public Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key, double min, double max, long offset, long count) Description copied from interface:StringRedisConnection- Specified by:
zRangeByScoreWithScoresin interfaceStringRedisConnection- Returns:
- See Also:
-
zRangeByScoreWithScores
public Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key, double min, double max) Description copied from interface:StringRedisConnection- Specified by:
zRangeByScoreWithScoresin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zRangeWithScores
Description copied from interface:StringRedisConnection- Specified by:
zRangeWithScoresin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zRank
Description copied from interface:StringRedisConnectionDetermine the index of element withvaluein a sorted set.- Specified by:
zRankin interfaceStringRedisConnection- Parameters:
key- must not be null.value- the value.- Returns:
- See Also:
-
zRem
Description copied from interface:StringRedisConnectionRemovevaluesfrom sorted set. Return number of removed elements.- Specified by:
zRemin interfaceStringRedisConnection- Parameters:
key- must not be null.values- must not be null.- Returns:
- See Also:
-
zRemRange
Description copied from interface:StringRedisConnectionRemove elements in range betweenstartandendfrom sorted set withkey.- Specified by:
zRemRangein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zRemRangeByLex
Description copied from interface:StringRedisConnectionRemove all elements between the lexicographicalRedisZSetCommands.Range.- Specified by:
zRemRangeByLexin interfaceStringRedisConnection- Parameters:
key- must not be null.range- must not be null.- Returns:
- the number of elements removed, or null when used in pipeline / transaction.
- See Also:
-
zRemRangeByScore
Description copied from interface:StringRedisConnectionRemove elements with scores betweenminandmaxfrom sorted set withkey.- Specified by:
zRemRangeByScorein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zRevRange
Description copied from interface:StringRedisConnectionGet elements in range fromstarttoendfrom sorted set ordered from high to low.- Specified by:
zRevRangein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zRevRangeWithScores
Description copied from interface:StringRedisConnection- Specified by:
zRevRangeWithScoresin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zRevRangeByScore
Description copied from interface:StringRedisConnectionGet elements where score is betweenminandmaxfrom sorted set ordered from high to low.- Specified by:
zRevRangeByScorein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zRevRangeByScoreWithScores
public Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key, double min, double max) Description copied from interface:StringRedisConnection- Specified by:
zRevRangeByScoreWithScoresin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zRevRangeByScore
Description copied from interface:StringRedisConnectionGet elements in range fromstarttoendwhere score is betweenminandmaxfrom sorted set ordered high -> low.- Specified by:
zRevRangeByScorein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zRevRangeByScoreWithScores
public Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key, double min, double max, long offset, long count) Description copied from interface:StringRedisConnectionGet set ofTuplein range fromstarttoendwhere score is betweenminandmaxfrom sorted set ordered high -> low.- Specified by:
zRevRangeByScoreWithScoresin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zRevRank
Description copied from interface:StringRedisConnectionDetermine the index of element withvaluein a sorted set when scored high to low.- Specified by:
zRevRankin interfaceStringRedisConnection- Parameters:
key- must not be null.value- the value.- Returns:
- See Also:
-
zScore
Description copied from interface:StringRedisConnectionGet the score of element withvaluefrom sorted set with keykey.- Specified by:
zScorein interfaceStringRedisConnection- Parameters:
key- must not be null.value- the value.- Returns:
- See Also:
-
zMScore
Description copied from interface:StringRedisConnectionGet the scores of elements withvaluesfrom sorted set with keykey.- Specified by:
zMScorein interfaceStringRedisConnection- Parameters:
key- must not be null.values- the values.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zUnionStore
Description copied from interface:StringRedisConnectionUnion sortedsetsand store result in destinationkey.- Specified by:
zUnionStorein interfaceStringRedisConnection- Parameters:
destKey- must not be null.aggregate- must not be null.sets- must not be null.- Returns:
- See Also:
-
zUnionStore
Description copied from interface:StringRedisConnectionUnion sortedsetsand store result in destinationkey.- Specified by:
zUnionStorein interfaceStringRedisConnection- Parameters:
destKey- must not be null.sets- must not be null.- Returns:
- See Also:
-
geoAdd
Description copied from interface:RedisGeoCommandsAddPointwith given member name to key.- Specified by:
geoAddin interfaceDefaultedRedisConnection- Specified by:
geoAddin interfaceRedisGeoCommands- Parameters:
key- must not be null.point- must not be null.member- must not be null.- Returns:
- Number of elements added. null when used in pipeline / transaction.
- See Also:
-
geoAdd
Description copied from interface:RedisGeoCommandsAddRedisGeoCommands.GeoLocationto key.- Specified by:
geoAddin interfaceRedisGeoCommands- Parameters:
key- must not be null.location- must not be null.- Returns:
- Number of elements added. null when used in pipeline / transaction.
- See Also:
-
geoAdd
Description copied from interface:StringRedisConnectionAddPointwith given member name to key.- Specified by:
geoAddin interfaceStringRedisConnection- Parameters:
key- must not be null.point- must not be null.member- must not be null.- Returns:
- Number of elements added.
- See Also:
-
geoAdd
Description copied from interface:StringRedisConnectionAddRedisGeoCommands.GeoLocationto key.- Specified by:
geoAddin interfaceStringRedisConnection- Parameters:
key- must not be null.location- must not be null.- Returns:
- Number of elements added.
- See Also:
-
geoAdd
Description copied from interface:RedisGeoCommands- Specified by:
geoAddin interfaceDefaultedRedisConnection- Specified by:
geoAddin interfaceRedisGeoCommands- Parameters:
key- must not be null.memberCoordinateMap- must not be null.- Returns:
- Number of elements added. null when used in pipeline / transaction.
- See Also:
-
geoAdd
Description copied from interface:RedisGeoCommandsAddRedisGeoCommands.GeoLocations to key- Specified by:
geoAddin interfaceDefaultedRedisConnection- Specified by:
geoAddin interfaceRedisGeoCommands- Parameters:
key- must not be null.locations- must not be null.- Returns:
- Number of elements added. null when used in pipeline / transaction.
- See Also:
-
geoAdd
Description copied from interface:StringRedisConnection- Specified by:
geoAddin interfaceStringRedisConnection- Parameters:
key- must not be null.memberCoordinateMap- must not be null.- Returns:
- Number of elements added.
- See Also:
-
geoAdd
Description copied from interface:StringRedisConnectionAddRedisGeoCommands.GeoLocations to key- Specified by:
geoAddin interfaceStringRedisConnection- Parameters:
key- must not be null.locations- must not be null.- Returns:
- Number of elements added.
- See Also:
-
geoDist
Description copied from interface:RedisGeoCommandsGet theDistancebetween member1 and member2.- Specified by:
geoDistin interfaceDefaultedRedisConnection- Specified by:
geoDistin interfaceRedisGeoCommands- Parameters:
key- must not be null.member1- must not be null.member2- must not be null.- Returns:
- can be null. null when used in pipeline / transaction.
- See Also:
-
geoDist
Description copied from interface:StringRedisConnectionGet theDistancebetween member1 and member2.- Specified by:
geoDistin interfaceStringRedisConnection- Parameters:
key- must not be null.member1- must not be null.member2- must not be null.- Returns:
- can be null.
- See Also:
-
geoDist
Description copied from interface:RedisGeoCommands- Specified by:
geoDistin interfaceDefaultedRedisConnection- Specified by:
geoDistin interfaceRedisGeoCommands- Parameters:
key- must not be null.member1- must not be null.member2- must not be null.metric- must not be null.- Returns:
- can be null. null when used in pipeline / transaction.
- See Also:
-
geoDist
Description copied from interface:StringRedisConnection- Specified by:
geoDistin interfaceStringRedisConnection- Parameters:
key- must not be null.member1- must not be null.member2- must not be null.metric- must not be null.- Returns:
- can be null.
- See Also:
-
geoHash
Description copied from interface:RedisGeoCommandsGet Geohash representation of the position for one or more members.- Specified by:
geoHashin interfaceDefaultedRedisConnection- Specified by:
geoHashin interfaceRedisGeoCommands- Parameters:
key- must not be null.members- must not be null.- Returns:
- empty list when key or members do not exists. null when used in pipeline / transaction.
- See Also:
-
geoHash
Description copied from interface:StringRedisConnectionGet geohash representation of the position for one or more members.- Specified by:
geoHashin interfaceStringRedisConnection- Parameters:
key- must not be null.members- must not be null.- Returns:
- never null.
- See Also:
-
geoPos
Description copied from interface:RedisGeoCommandsGet thePointrepresentation of positions for one or more members.- Specified by:
geoPosin interfaceDefaultedRedisConnection- Specified by:
geoPosin interfaceRedisGeoCommands- Parameters:
key- must not be null.members- must not be null.- Returns:
- empty
Listwhen key of members do not exist. null when used in pipeline / transaction. - See Also:
-
geoPos
Description copied from interface:StringRedisConnectionGet thePointrepresentation of positions for one or more members.- Specified by:
geoPosin interfaceStringRedisConnection- Parameters:
key- must not be null.members- must not be null.- Returns:
- never null.
- See Also:
-
geoRadius
Description copied from interface:StringRedisConnectionGet the members within the boundaries of a givenCircle.- Specified by:
geoRadiusin interfaceStringRedisConnection- Parameters:
key- must not be null.within- must not be null.- Returns:
- never null.
- See Also:
-
geoRadius
public GeoResults<RedisGeoCommands.GeoLocation<String>> geoRadius(String key, Circle within, RedisGeoCommands.GeoRadiusCommandArgs args) Description copied from interface:StringRedisConnectionGet the members within the boundaries of a givenCircleapplyingRedisGeoCommands.GeoRadiusCommandArgs.- Specified by:
geoRadiusin interfaceStringRedisConnection- Parameters:
key- must not be null.within- must not be null.args- must not be null.- Returns:
- never null.
- See Also:
-
geoRadiusByMember
public GeoResults<RedisGeoCommands.GeoLocation<String>> geoRadiusByMember(String key, String member, double radius) Description copied from interface:StringRedisConnectionGet the members within the circle defined by the members coordinates and given radius.- Specified by:
geoRadiusByMemberin interfaceStringRedisConnection- Parameters:
key- must not be null.member- must not be null.- Returns:
- never null.
- See Also:
-
geoRadiusByMember
public GeoResults<RedisGeoCommands.GeoLocation<String>> geoRadiusByMember(String key, String member, Distance radius) Description copied from interface:StringRedisConnectionGet the members within the circle defined by the members coordinates and givenDistance.- Specified by:
geoRadiusByMemberin interfaceStringRedisConnection- Parameters:
key- must not be null.member- must not be null.radius- must not be null.- Returns:
- never null.
- See Also:
-
geoRadiusByMember
public GeoResults<RedisGeoCommands.GeoLocation<String>> geoRadiusByMember(String key, String member, Distance radius, RedisGeoCommands.GeoRadiusCommandArgs args) Description copied from interface:StringRedisConnectionGet the members within the circle defined by the members coordinates and givenDistanceandRedisGeoCommands.GeoRadiusCommandArgs.- Specified by:
geoRadiusByMemberin interfaceStringRedisConnection- Parameters:
key- must not be null.member- must not be null.radius- must not be null.args- must not be null.- Returns:
- never null.
- See Also:
-
geoRadius
Description copied from interface:RedisGeoCommandsGet the members within the boundaries of a givenCircle.- Specified by:
geoRadiusin interfaceDefaultedRedisConnection- Specified by:
geoRadiusin interfaceRedisGeoCommands- Parameters:
key- must not be null.within- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
geoRadius
public GeoResults<RedisGeoCommands.GeoLocation<byte[]>> geoRadius(byte[] key, Circle within, RedisGeoCommands.GeoRadiusCommandArgs args) Description copied from interface:RedisGeoCommandsGet the members within the boundaries of a givenCircleapplyingRedisGeoCommands.GeoRadiusCommandArgs.- Specified by:
geoRadiusin interfaceDefaultedRedisConnection- Specified by:
geoRadiusin interfaceRedisGeoCommands- Parameters:
key- must not be null.within- must not be null.args- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
geoRadiusByMember
public GeoResults<RedisGeoCommands.GeoLocation<byte[]>> geoRadiusByMember(byte[] key, byte[] member, double radius) Description copied from interface:RedisGeoCommandsGet the members within the circle defined by the members coordinates and given radius.- Specified by:
geoRadiusByMemberin interfaceRedisGeoCommands- Parameters:
key- must not be null.member- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
geoRadiusByMember
public GeoResults<RedisGeoCommands.GeoLocation<byte[]>> geoRadiusByMember(byte[] key, byte[] member, Distance radius) Description copied from interface:RedisGeoCommandsGet the members within the circle defined by the members coordinates and givenDistance.- Specified by:
geoRadiusByMemberin interfaceDefaultedRedisConnection- Specified by:
geoRadiusByMemberin interfaceRedisGeoCommands- Parameters:
key- must not be null.member- must not be null.radius- must not be null.- Returns:
- null when used in pipeline / transaction..
- See Also:
-
geoRadiusByMember
public GeoResults<RedisGeoCommands.GeoLocation<byte[]>> geoRadiusByMember(byte[] key, byte[] member, Distance radius, RedisGeoCommands.GeoRadiusCommandArgs args) Description copied from interface:RedisGeoCommandsGet the members within the circle defined by the members coordinates, givenDistanceandRedisGeoCommands.GeoRadiusCommandArgs.- Specified by:
geoRadiusByMemberin interfaceDefaultedRedisConnection- Specified by:
geoRadiusByMemberin interfaceRedisGeoCommands- Parameters:
key- must not be null.member- must not be null.radius- must not be null.args- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
geoRemove
Description copied from interface:RedisGeoCommandsRemove the members.- Specified by:
geoRemovein interfaceDefaultedRedisConnection- Specified by:
geoRemovein interfaceRedisGeoCommands- Parameters:
key- must not be null.members- must not be null.- Returns:
- Number of elements removed. null when used in pipeline / transaction.
- See Also:
-
geoRemove
Description copied from interface:StringRedisConnectionRemove the members.- Specified by:
geoRemovein interfaceStringRedisConnection- Parameters:
key- must not be null.members- must not be null.- Returns:
- Number of members elements removed.
- See Also:
-
geoSearch
public GeoResults<RedisGeoCommands.GeoLocation<byte[]>> geoSearch(byte[] key, GeoReference<byte[]> reference, GeoShape predicate, RedisGeoCommands.GeoSearchCommandArgs args) Description copied from interface:RedisGeoCommandsReturn the members of a geo set which are within the borders of the area specified by a givenshape. The query's center point is provided byGeoReference.- Specified by:
geoSearchin interfaceDefaultedRedisConnection- Specified by:
geoSearchin interfaceRedisGeoCommands- Parameters:
key- must not be null.reference- must not be null.predicate- must not be null.args- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
geoSearchStore
public Long geoSearchStore(byte[] destKey, byte[] key, GeoReference<byte[]> reference, GeoShape predicate, RedisGeoCommands.GeoSearchStoreCommandArgs args) Description copied from interface:RedisGeoCommandsQuery the members of a geo set which are within the borders of the area specified by a givenshapeand store the result atdestKey. The query's center point is provided byGeoReference.- Specified by:
geoSearchStorein interfaceDefaultedRedisConnection- Specified by:
geoSearchStorein interfaceRedisGeoCommandskey- must not be null.reference- must not be null.predicate- must not be null.args- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
geoSearch
public GeoResults<RedisGeoCommands.GeoLocation<String>> geoSearch(String key, GeoReference<String> reference, GeoShape predicate, RedisGeoCommands.GeoSearchCommandArgs args) Description copied from interface:StringRedisConnectionReturn the members of a geo set which are within the borders of the area specified by a givenshape. The query's center point is provided byGeoReference.- Specified by:
geoSearchin interfaceStringRedisConnection- Parameters:
key- must not be null.reference- must not be null.predicate- must not be null.args- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
geoSearchStore
public Long geoSearchStore(String destKey, String key, GeoReference<String> reference, GeoShape predicate, RedisGeoCommands.GeoSearchStoreCommandArgs args) Description copied from interface:StringRedisConnectionQuery the members of a geo set which are within the borders of the area specified by a givenshapeand store the result atdestKey. The query's center point is provided byGeoReference.- Specified by:
geoSearchStorein interfaceStringRedisConnectionkey- must not be null.reference- must not be null.predicate- must not be null.args- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
closePipeline
Description copied from interface:RedisConnectionExecutes the commands in the pipeline and returns their result. If the connection is not pipelined, an empty collection is returned.- Specified by:
closePipelinein interfaceRedisConnection- Returns:
- the result of the executed commands.
-
isPipelined
public boolean isPipelined()Description copied from interface:RedisConnectionIndicates whether the connection is currently pipelined or not.- Specified by:
isPipelinedin interfaceRedisConnection- Returns:
- true if the connection is pipelined, false otherwise
- See Also:
-
openPipeline
public void openPipeline()Description copied from interface:RedisConnectionActivates the pipeline mode for this connection. When pipelined, all commands return null (the reply is read at the end throughRedisConnection.closePipeline(). Calling this method when the connection is already pipelined has no effect. Pipelining is used for issuing commands without requesting the response right away but rather at the end of the batch. While somewhat similar to MULTI, pipelining does not guarantee atomicity - it only tries to improve performance when issuing a lot of commands (such as in batching scenarios).Note:
Consider doing some performance testing before using this feature since in many cases the performance benefits are minimal yet the impact on usage are not.- Specified by:
openPipelinein interfaceRedisConnection- See Also:
-
execute
Description copied from interface:StringRedisConnection'Native' or 'raw' execution of the given command along-side the given arguments. The command is executed as is, with as little 'interpretation' as possible - it is up to the caller to take care of any processing of arguments or the result.- Specified by:
executein interfaceStringRedisConnection- Parameters:
command- Command to execute- Returns:
- execution result.
- See Also:
-
execute
Description copied from interface:RedisCommandsNative or raw execution of the given Redis command along with the given arguments.The command is executed as is, with as little interpretation as possible - it is up to the caller to take care of any processing of arguments or the result.
- Specified by:
executein interfaceRedisCommands- Parameters:
command- Rediscommandto execute; must not be null.args- optional array of command arguments; may be empty;- Returns:
- the execution result; may be null.
-
execute
Description copied from interface:StringRedisConnection'Native' or 'raw' execution of the given command along-side the given arguments. The command is executed as is, with as little 'interpretation' as possible - it is up to the caller to take care of any processing of arguments or the result.- Specified by:
executein interfaceStringRedisConnection- Parameters:
command- Command to executeargs- Possible command arguments (may be null)- Returns:
- execution result.
- See Also:
-
pExpire
Description copied from interface:StringRedisConnectionSet time to live for givenkeyin milliseconds.- Specified by:
pExpirein interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
pExpireAt
Description copied from interface:StringRedisConnectionSet the expiration for givenkeyas a UNIX timestamp in milliseconds.- Specified by:
pExpireAtin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
pTtl
Description copied from interface:StringRedisConnectionGet the precise time to live forkeyin milliseconds.- Specified by:
pTtlin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
pTtl
Description copied from interface:StringRedisConnectionGet the precise time to live forkeyin and convert it to the givenTimeUnit.- Specified by:
pTtlin interfaceStringRedisConnection- Parameters:
key- must not be null.timeUnit- must not be null.- Returns:
- See Also:
-
scriptLoad
Description copied from interface:StringRedisConnectionLoad lua script into scripts cache, without executing it.
Execute the script by callingDefaultedRedisConnection.evalSha(byte[], ReturnType, int, byte[]...).- Specified by:
scriptLoadin interfaceStringRedisConnection- Parameters:
script- must not be null.- Returns:
- See Also:
-
eval
NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same serializer used here. They will be returned as byte[]s- Specified by:
evalin interfaceStringRedisConnection- Parameters:
script- must not be null.returnType- must not be null.keysAndArgs- must not be null.- Returns:
- See Also:
-
evalSha
NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same serializer used here. They will be returned as byte[]s- Specified by:
evalShain interfaceStringRedisConnection- Parameters:
scriptSha1- must not be null.returnType- must not be null.keysAndArgs- must not be null.- Returns:
- See Also:
-
time
Description copied from interface:RedisServerCommandsRequest server timestamp usingTIMEcommand inTimeUnit.MILLISECONDS.- Specified by:
timein interfaceDefaultedRedisConnection- Specified by:
timein interfaceRedisServerCommands- Returns:
- current server time in milliseconds or null when used in pipeline / transaction.
- See Also:
-
time
Description copied from interface:RedisServerCommandsRequest server timestamp usingTIMEcommand.- Specified by:
timein interfaceDefaultedRedisConnection- Specified by:
timein interfaceRedisServerCommands- Parameters:
timeUnit- target unit.- Returns:
- current server time in
TimeUnitor null when used in pipeline / transaction. - See Also:
-
getClientList
Description copied from interface:StringRedisConnectionRequest information and statistics about connected clients.- Specified by:
getClientListin interfaceDefaultedRedisConnection- Specified by:
getClientListin interfaceRedisServerCommands- Specified by:
getClientListin interfaceStringRedisConnection- Returns:
ListofRedisClientInfoobjects.- See Also:
-
replicaOf
Description copied from interface:RedisServerCommandsChange redis replication setting to new master.- Specified by:
replicaOfin interfaceDefaultedRedisConnection- Specified by:
replicaOfin interfaceRedisServerCommands- Parameters:
host- must not be null.- See Also:
-
replicaOfNoOne
public void replicaOfNoOne()Description copied from interface:RedisServerCommandsChange server into master.- Specified by:
replicaOfNoOnein interfaceDefaultedRedisConnection- Specified by:
replicaOfNoOnein interfaceRedisServerCommands- See Also:
-
scan
Description copied from interface:RedisKeyCommandsUse aCursorto iterate over keys.- Specified by:
scanin interfaceDefaultedRedisConnection- Specified by:
scanin interfaceRedisKeyCommands- Parameters:
options- must not be null.- Returns:
- never null.
- See Also:
-
zScan
Description copied from interface:RedisZSetCommandsUse aCursorto iterate over elements in sorted set atkey.- Specified by:
zScanin interfaceDefaultedRedisConnection- Specified by:
zScanin interfaceRedisZSetCommands- Parameters:
key- must not be null.options- must not be null.- Returns:
- See Also:
-
sScan
Description copied from interface:RedisSetCommandsUse aCursorto iterate over elements in set atkey.- Specified by:
sScanin interfaceDefaultedRedisConnection- Specified by:
sScanin interfaceRedisSetCommands- Parameters:
key- must not be null.options- must not be null.- Returns:
- never null.
- See Also:
-
hScan
Description copied from interface:RedisHashCommandsUse aCursorto iterate over entries in hash atkey.- Specified by:
hScanin interfaceDefaultedRedisConnection- Specified by:
hScanin interfaceRedisHashCommands- Parameters:
key- must not be null.options- must not be null.- Returns:
- See Also:
-
hStrLen
Description copied from interface:RedisHashCommandsReturns the length of the value associated withfieldin the hash stored atkey. If thekeyor thefielddo not exist,0is returned.- Specified by:
hStrLenin interfaceDefaultedRedisConnection- Specified by:
hStrLenin interfaceRedisHashCommands- Parameters:
key- must not be null.field- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
setClientName
public void setClientName(byte[] name) Description copied from interface:RedisServerCommandsAssign given name to current connection.- Specified by:
setClientNamein interfaceDefaultedRedisConnection- Specified by:
setClientNamein interfaceRedisServerCommands- See Also:
-
setClientName
Description copied from interface:StringRedisConnectionAssign given name to current connection.- Specified by:
setClientNamein interfaceStringRedisConnection- See Also:
-
killClient
Description copied from interface:RedisServerCommandsCloses a given client connection identified by host:port.- Specified by:
killClientin interfaceDefaultedRedisConnection- Specified by:
killClientin interfaceRedisServerCommands- Parameters:
host- of connection to close.port- of connection to close- See Also:
-
getClientName
Description copied from interface:RedisServerCommandsReturns the name of the current connection.- Specified by:
getClientNamein interfaceDefaultedRedisConnection- Specified by:
getClientNamein interfaceRedisServerCommands- Returns:
- null when used in pipeline / transaction.
- See Also:
-
hScan
Description copied from interface:StringRedisConnectionUse aCursorto iterate over entries in hash atkey.- Specified by:
hScanin interfaceStringRedisConnection- Parameters:
key- must not be null.options- must not be null.- Returns:
- See Also:
-
hStrLen
Description copied from interface:StringRedisConnectionReturns the length of the value associated withfieldin the hash stored atkey. If the key or the field do not exist,0is returned.- Specified by:
hStrLenin interfaceStringRedisConnection- Parameters:
key- must not be null.field- must not be null.- Returns:
- null when used in pipeline / transaction.
-
sScan
Description copied from interface:StringRedisConnectionUse aCursorto iterate over elements in set atkey.- Specified by:
sScanin interfaceStringRedisConnection- Parameters:
key- must not be null.options- must not be null.- Returns:
- See Also:
-
zScan
Description copied from interface:StringRedisConnectionUse aCursorto iterate over elements in sorted set atkey.- Specified by:
zScanin interfaceStringRedisConnection- Parameters:
key- must not be null.options- must not be null.- Returns:
- See Also:
-
getSentinelConnection
- Specified by:
getSentinelConnectionin interfaceRedisConnection- Returns:
- the
RedisSentinelConnectionwhen using Redis Sentinel.
-
zRangeByScore
Description copied from interface:StringRedisConnectionGet elements where score is betweenminandmaxfrom sorted set.- Specified by:
zRangeByScorein interfaceStringRedisConnection- Parameters:
key- must not be null.min- must not be null.max- must not be null.- Returns:
- See Also:
-
zRangeByScore
Description copied from interface:StringRedisConnectionGet elements in range fromstarttoendwhere score is betweenminandmaxfrom sorted set.- Specified by:
zRangeByScorein interfaceStringRedisConnection- Parameters:
key- must not be null.min- must not be null.max- must not be null.- Returns:
- See Also:
-
zRangeByScore
Description copied from interface:RedisZSetCommandsGet elements where score is betweenminandmaxfrom sorted set.- Specified by:
zRangeByScorein interfaceDefaultedRedisConnection- Specified by:
zRangeByScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRangeByScore
Description copied from interface:RedisZSetCommandsGet elements in range fromstarttoendwhere score is betweenminandmaxfrom sorted set.- Specified by:
zRangeByScorein interfaceDefaultedRedisConnection- Specified by:
zRangeByScorein interfaceRedisZSetCommands- Parameters:
key- must not be null.min- must not be null.max- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
pfAdd
Description copied from interface:RedisHyperLogLogCommandsAdds given values to the HyperLogLog stored at given key.- Specified by:
pfAddin interfaceDefaultedRedisConnection- Specified by:
pfAddin interfaceRedisHyperLogLogCommands- Parameters:
key- must not be null.values- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
pfAdd
Description copied from interface:StringRedisConnectionAdds given values to the HyperLogLog stored at given key.- Specified by:
pfAddin interfaceStringRedisConnection- Parameters:
key- must not be null.values- must not be null.- Returns:
- See Also:
-
pfCount
Description copied from interface:RedisHyperLogLogCommandsReturn the approximated cardinality of the structures observed by the HyperLogLog at key(s).- Specified by:
pfCountin interfaceDefaultedRedisConnection- Specified by:
pfCountin interfaceRedisHyperLogLogCommands- Parameters:
keys- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
pfCount
Description copied from interface:StringRedisConnectionReturn the approximated cardinality of the structures observed by the HyperLogLog at key(s).- Specified by:
pfCountin interfaceStringRedisConnection- Parameters:
keys- must not be null.- Returns:
- See Also:
-
pfMerge
public void pfMerge(byte[] destinationKey, byte[]... sourceKeys) Description copied from interface:RedisHyperLogLogCommandsMerge N different HyperLogLogs at sourceKeys into a single destinationKey.- Specified by:
pfMergein interfaceDefaultedRedisConnection- Specified by:
pfMergein interfaceRedisHyperLogLogCommands- Parameters:
destinationKey- must not be null.sourceKeys- must not be null.- See Also:
-
pfMerge
Description copied from interface:StringRedisConnectionMerge N different HyperLogLogs at sourceKeys into a single destinationKey.- Specified by:
pfMergein interfaceStringRedisConnection- Parameters:
destinationKey- must not be null.sourceKeys- must not be null.- See Also:
-
zRangeByLex
Description copied from interface:RedisZSetCommandsGet all the elements in the sorted set at key in lexicographical ordering.- Specified by:
zRangeByLexin interfaceRedisZSetCommands- Parameters:
key- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRangeByLex
Description copied from interface:RedisZSetCommandsGet all the elements inRangefrom the sorted set at key in lexicographical ordering.- Specified by:
zRangeByLexin interfaceRedisZSetCommands- Parameters:
key- must not be null.range- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRangeByLex
Description copied from interface:RedisZSetCommandsGet all the elements inRangefrom the sorted set at key in lexicographical ordering. Result is limited viaRedisZSetCommands.Limit.- Specified by:
zRangeByLexin interfaceDefaultedRedisConnection- Specified by:
zRangeByLexin interfaceRedisZSetCommands- Parameters:
key- must not be null.range- must not be null.limit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRangeByLex
Description copied from interface:StringRedisConnectionGet all the elements in the sorted set at key in lexicographical ordering.- Specified by:
zRangeByLexin interfaceStringRedisConnection- Parameters:
key- must not be null.- Returns:
- See Also:
-
zRangeByLex
Description copied from interface:StringRedisConnectionGet all the elements inRedisZSetCommands.Rangefrom the sorted set at key in lexicographical ordering.- Specified by:
zRangeByLexin interfaceStringRedisConnection- Parameters:
key- must not be null.range- must not be null.- Returns:
- See Also:
-
zRangeByLex
Description copied from interface:StringRedisConnectionGet all the elements inRedisZSetCommands.Rangefrom the sorted set at key in lexicographical ordering. Result is limited viaLimit.- Specified by:
zRangeByLexin interfaceStringRedisConnection- Parameters:
key- must not be null.range- must not be null.limit- can be null.- Returns:
- See Also:
-
zRevRangeByLex
Description copied from interface:RedisZSetCommandsGet all the elements inRangefrom the sorted set at key in reversed lexicographical ordering. Result is limited viaRedisZSetCommands.Limit.- Specified by:
zRevRangeByLexin interfaceDefaultedRedisConnection- Specified by:
zRevRangeByLexin interfaceRedisZSetCommands- Parameters:
key- must not be null.range- must not be null.limit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRevRangeByLex
Description copied from interface:StringRedisConnectionGet all the elements inRedisZSetCommands.Rangefrom the sorted set at key in reversed lexicographical ordering. Result is limited viaLimit.- Specified by:
zRevRangeByLexin interfaceStringRedisConnection- Parameters:
key- must not be null.range- must not be null.limit- must not be null.- Returns:
- See Also:
-
zRangeStoreByLex
Description copied from interface:RedisZSetCommandsThis command is like ZRANGE , but stores the result in the dstKey destination key.- Specified by:
zRangeStoreByLexin interfaceDefaultedRedisConnection- Specified by:
zRangeStoreByLexin interfaceRedisZSetCommands- Parameters:
dstKey- must not be null.srcKey- must not be null.range- must not be null.limit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRangeStoreByLex
Description copied from interface:StringRedisConnectionThis command is like ZRANGE , but stores the result in the dstKey destination key.- Specified by:
zRangeStoreByLexin interfaceStringRedisConnection- Parameters:
dstKey- must not be null.srcKey- must not be null.range- must not be null.limit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRangeStoreRevByLex
Description copied from interface:RedisZSetCommandsThis command is like ZRANGE … REV , but stores the result in the dstKey destination key.- Specified by:
zRangeStoreRevByLexin interfaceDefaultedRedisConnection- Specified by:
zRangeStoreRevByLexin interfaceRedisZSetCommands- Parameters:
dstKey- must not be null.srcKey- must not be null.range- must not be null.limit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRangeStoreRevByLex
Description copied from interface:StringRedisConnectionThis command is like ZRANGE … REV , but stores the result in the dstKey destination key.- Specified by:
zRangeStoreRevByLexin interfaceStringRedisConnection- Parameters:
dstKey- must not be null.srcKey- must not be null.range- must not be null.limit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRangeStoreByScore
public Long zRangeStoreByScore(byte[] dstKey, byte[] srcKey, Range<? extends Number> range, Limit limit) Description copied from interface:RedisZSetCommandsThis command is like ZRANGE, but stores the result in the dstKey destination key.- Specified by:
zRangeStoreByScorein interfaceDefaultedRedisConnection- Specified by:
zRangeStoreByScorein interfaceRedisZSetCommands- Parameters:
dstKey- must not be null.srcKey- must not be null.range- must not be null.limit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRangeStoreByScore
public Long zRangeStoreByScore(String dstKey, String srcKey, Range<? extends Number> range, Limit limit) Description copied from interface:StringRedisConnectionThis command is like ZRANGE, but stores the result in the dstKey destination key.- Specified by:
zRangeStoreByScorein interfaceStringRedisConnection- Parameters:
dstKey- must not be null.srcKey- must not be null.range- must not be null.limit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRangeStoreRevByScore
public Long zRangeStoreRevByScore(byte[] dstKey, byte[] srcKey, Range<? extends Number> range, Limit limit) Description copied from interface:RedisZSetCommandsThis command is like ZRANGE … REV, but stores the result in the dstKey destination key.- Specified by:
zRangeStoreRevByScorein interfaceDefaultedRedisConnection- Specified by:
zRangeStoreRevByScorein interfaceRedisZSetCommands- Parameters:
dstKey- must not be null.srcKey- must not be null.range- must not be null.limit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zRangeStoreRevByScore
public Long zRangeStoreRevByScore(String dstKey, String srcKey, Range<? extends Number> range, Limit limit) Description copied from interface:StringRedisConnectionThis command is like ZRANGE … REV, but stores the result in the dstKey destination key.- Specified by:
zRangeStoreRevByScorein interfaceStringRedisConnection- Parameters:
dstKey- must not be null.srcKey- must not be null.range- must not be null.limit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
migrate
public void migrate(byte[] key, RedisNode target, int dbIndex, @Nullable RedisServerCommands.MigrateOption option) Description copied from interface:RedisServerCommandsAtomically transfer a key from a source Redis instance to a destination Redis instance. On success the key is deleted from the original instance and is guaranteed to exist in the target instance.- Specified by:
migratein interfaceDefaultedRedisConnection- Specified by:
migratein interfaceRedisServerCommands- Parameters:
key- must not be null.target- must not be null.option- can be null. Defaulted toRedisServerCommands.MigrateOption.COPY.- See Also:
-
migrate
public void migrate(byte[] key, RedisNode target, int dbIndex, @Nullable RedisServerCommands.MigrateOption option, long timeout) Description copied from interface:RedisServerCommandsAtomically transfer a key from a source Redis instance to a destination Redis instance. On success the key is deleted from the original instance and is guaranteed to exist in the target instance.- Specified by:
migratein interfaceDefaultedRedisConnection- Specified by:
migratein interfaceRedisServerCommands- Parameters:
key- must not be null.target- must not be null.option- can be null. Defaulted toRedisServerCommands.MigrateOption.COPY.- See Also:
-
xAck
- Specified by:
xAckin interfaceStringRedisConnection
-
xAdd
Description copied from interface:StringRedisConnectionAppend the givenStringRecordto the stream stored atRecord.getStream().- Specified by:
xAddin interfaceStringRedisConnection- Parameters:
record- must not be null.options- must not be null, useRedisStreamCommands.XAddOptions.none()instead.- Returns:
- the record Id. null when used in pipeline / transaction.
-
xClaimJustId
public List<RecordId> xClaimJustId(String key, String group, String consumer, RedisStreamCommands.XClaimOptions options) Description copied from interface:StringRedisConnectionChange the ownership of a pending message to the given new consumer without increasing the delivered count.- Specified by:
xClaimJustIdin interfaceStringRedisConnection- Parameters:
key- the key the stream is stored at.group- the name of the consumer group.consumer- the name of the new consumer.options- must not be null.- Returns:
- list of
idsthat changed user. - See Also:
-
xClaim
public List<StringRecord> xClaim(String key, String group, String consumer, RedisStreamCommands.XClaimOptions options) Description copied from interface:StringRedisConnectionChange the ownership of a pending message to the given new consumer.- Specified by:
xClaimin interfaceStringRedisConnection- Parameters:
key- the key the stream is stored at.group- the name of the consumer group.consumer- the name of the new consumer.options- must not be null.- Returns:
- list of
StringRecordthat changed user. - See Also:
-
xDel
- Specified by:
xDelin interfaceStringRedisConnection
-
xGroupCreate
Description copied from interface:StringRedisConnectionCreate a consumer group.- Specified by:
xGroupCreatein interfaceStringRedisConnection- Parameters:
key- the stream key.group- name of the consumer group.- Returns:
- true if successful. null when used in pipeline / transaction.
-
xGroupCreate
Description copied from interface:StringRedisConnectionCreate a consumer group.- Specified by:
xGroupCreatein interfaceStringRedisConnection- Parameters:
key- the stream key.group- name of the consumer group.mkStream- if true the group will create the stream if needed (MKSTREAM)- Returns:
- true if successful. null when used in pipeline / transaction.
-
xGroupDelConsumer
Description copied from interface:StringRedisConnectionDelete a consumer from a consumer group.- Specified by:
xGroupDelConsumerin interfaceStringRedisConnection- Parameters:
key- the stream key.consumer- consumer identified by group name and consumer key.- Returns:
- true if successful. null when used in pipeline / transaction.
-
xGroupDestroy
Description copied from interface:StringRedisConnectionDestroy a consumer group.- Specified by:
xGroupDestroyin interfaceStringRedisConnection- Parameters:
key- the stream key.group- name of the consumer group.- Returns:
- true if successful. null when used in pipeline / transaction.
-
xInfo
Description copied from interface:StringRedisConnectionObtain general information about the stream stored at the specified key.- Specified by:
xInfoin interfaceStringRedisConnection- Parameters:
key- the key the stream is stored at.- Returns:
- null when used in pipeline / transaction.
-
xInfoGroups
Description copied from interface:StringRedisConnectionObtain information about consumer groups associated with the stream stored at the specified key.- Specified by:
xInfoGroupsin interfaceStringRedisConnection- Parameters:
key- the key the stream is stored at.- Returns:
- null when used in pipeline / transaction.
-
xInfoConsumers
Description copied from interface:StringRedisConnectionObtain information about every consumer in a specific consumer group for the stream stored at the specified key.- Specified by:
xInfoConsumersin interfaceStringRedisConnection- Parameters:
key- the key the stream is stored at.groupName- name of the consumer group.- Returns:
- null when used in pipeline / transaction.
-
xLen
Description copied from interface:StringRedisConnectionGet the length of a stream.- Specified by:
xLenin interfaceStringRedisConnection- Parameters:
key- the stream key.- Returns:
- length of the stream. null when used in pipeline / transaction.
- See Also:
-
xPending
Description copied from interface:StringRedisConnectionObtain thePendingMessagesSummaryfor a given consumer group.- Specified by:
xPendingin interfaceStringRedisConnection- Parameters:
key- the key the stream is stored at. Must not be null.groupName- the name of the consumer group. Must not be null.- Returns:
- a summary of pending messages within the given consumer group or null when used in pipeline / transaction.
- See Also:
-
xPending
public PendingMessages xPending(String key, String groupName, String consumer, Range<String> range, Long count) Description copied from interface:StringRedisConnection- Specified by:
xPendingin interfaceStringRedisConnection- Parameters:
key- the key the stream is stored at. Must not be null.groupName- the name of the consumer group. Must not be null.consumer- the name of the consumer. Must not be null.range- the range of messages ids to search within. Must not be null.count- limit the number of results. Must not be null.- Returns:
- pending messages for the given consumer group or null when used in pipeline / transaction.
- See Also:
-
xPending
Description copied from interface:StringRedisConnection- Specified by:
xPendingin interfaceStringRedisConnection- Parameters:
key- the key the stream is stored at. Must not be null.groupName- the name of the consumer group. Must not be null.range- the range of messages ids to search within. Must not be null.count- limit the number of results. Must not be null.- Returns:
- pending messages for the given consumer group or null when used in pipeline / transaction.
- See Also:
-
xPending
public PendingMessages xPending(String key, String groupName, RedisStreamCommands.XPendingOptions options) Description copied from interface:StringRedisConnection- Specified by:
xPendingin interfaceStringRedisConnection- Parameters:
key- the key the stream is stored at. Must not be null.groupName- the name of the consumer group. Must not be null.options- the options containing range, consumer and count. Must not be null.- Returns:
- pending messages matching given criteria or null when used in pipeline / transaction.
- See Also:
-
xRange
Description copied from interface:StringRedisConnectionRead records from a stream within a specificRedisZSetCommands.Rangeapplying aLimit.- Specified by:
xRangein interfaceStringRedisConnection- Parameters:
key- the stream key.range- must not be null.limit- must not be null.- Returns:
- list with members of the resulting stream. null when used in pipeline / transaction.
- See Also:
-
xReadAsString
public List<StringRecord> xReadAsString(StreamReadOptions readOptions, StreamOffset<String>... streams) Description copied from interface:StringRedisConnectionRead records from one or moreStreamOffsets.- Specified by:
xReadAsStringin interfaceStringRedisConnection- Parameters:
readOptions- read arguments.streams- the streams to read from.- Returns:
- list with members of the resulting stream. null when used in pipeline / transaction.
- See Also:
-
xReadGroupAsString
public List<StringRecord> xReadGroupAsString(Consumer consumer, StreamReadOptions readOptions, StreamOffset<String>... streams) Description copied from interface:StringRedisConnectionRead records from one or moreStreamOffsets using a consumer group.- Specified by:
xReadGroupAsStringin interfaceStringRedisConnection- Parameters:
consumer- consumer/group.readOptions- read arguments.streams- the streams to read from.- Returns:
- list with members of the resulting stream. null when used in pipeline / transaction.
- See Also:
-
xRevRange
Description copied from interface:StringRedisConnectionRead records from a stream within a specificRedisZSetCommands.Rangeapplying aLimitin reverse order.- Specified by:
xRevRangein interfaceStringRedisConnection- Parameters:
key- the stream key.range- must not be null.limit- must not be null.- Returns:
- list with members of the resulting stream. null when used in pipeline / transaction.
- See Also:
-
xTrim
Description copied from interface:StringRedisConnectionTrims the stream tocountelements.- Specified by:
xTrimin interfaceStringRedisConnection- Parameters:
key- the stream key.count- length of the stream.- Returns:
- number of removed entries. null when used in pipeline / transaction.
- See Also:
-
xTrim
Description copied from interface:StringRedisConnectionTrims the stream tocountelements.- Specified by:
xTrimin interfaceStringRedisConnection- Parameters:
key- the stream key.count- length of the stream.approximateTrimming- the trimming must be performed in a approximated way in order to maximize performances.- Returns:
- number of removed entries. null when used in pipeline / transaction.
- See Also:
-
xAck
Description copied from interface:RedisStreamCommandsAcknowledge one or more records, identified via their id, as processed.- Specified by:
xAckin interfaceDefaultedRedisConnection- Specified by:
xAckin interfaceRedisStreamCommands- Parameters:
key- the key the stream is stored at.group- name of the consumer group.recordIds- the id's of the records to acknowledge.- Returns:
- length of acknowledged messages. null when used in pipeline / transaction.
- See Also:
-
xAdd
public RecordId xAdd(MapRecord<byte[], byte[], byte[]> record, RedisStreamCommands.XAddOptions options) Description copied from interface:RedisStreamCommandsAppend the givenrecordto the stream stored atRecord#getStream. If you prefer manual id assignment over server generated ones make sure to provide an id viaRecord#withId.- Specified by:
xAddin interfaceDefaultedRedisConnection- Specified by:
xAddin interfaceRedisStreamCommands- Parameters:
record- therecordto append.options- additional options (eg. MAXLEN). Must not be null, useRedisStreamCommands.XAddOptions.none()instead.- Returns:
- the
idafter save. null when used in pipeline / transaction.
-
xClaimJustId
public List<RecordId> xClaimJustId(byte[] key, String group, String newOwner, RedisStreamCommands.XClaimOptions options) Description copied from interface:RedisStreamCommandsChange the ownership of a pending message to the given new consumer without increasing the delivered count.- Specified by:
xClaimJustIdin interfaceDefaultedRedisConnection- Specified by:
xClaimJustIdin interfaceRedisStreamCommands- Parameters:
key- the key the stream is stored at.group- the name of the consumer group.newOwner- the name of the new consumer.options- must not be null.- Returns:
- list of
idsthat changed user. - See Also:
-
xClaim
public List<ByteRecord> xClaim(byte[] key, String group, String newOwner, RedisStreamCommands.XClaimOptions options) Description copied from interface:RedisStreamCommandsChange the ownership of a pending message to the given new consumer.- Specified by:
xClaimin interfaceDefaultedRedisConnection- Specified by:
xClaimin interfaceRedisStreamCommands- Parameters:
key- the key the stream is stored at.group- the name of the consumer group.newOwner- the name of the new consumer.options- must not be null.- Returns:
- list of
ByteRecordthat changed user. - See Also:
-
xDel
Description copied from interface:RedisStreamCommandsRemoves the records with the given id's from the stream. Returns the number of items deleted, that may be different from the number of id's passed in case certain id's do not exist.- Specified by:
xDelin interfaceDefaultedRedisConnection- Specified by:
xDelin interfaceRedisStreamCommands- Parameters:
key- the key the stream is stored at.recordIds- the id's of the records to remove.- Returns:
- number of removed entries. null when used in pipeline / transaction.
- See Also:
-
xGroupCreate
Description copied from interface:RedisStreamCommandsCreate a consumer group.- Specified by:
xGroupCreatein interfaceDefaultedRedisConnection- Specified by:
xGroupCreatein interfaceRedisStreamCommands- Parameters:
key- the key the stream is stored at.groupName- name of the consumer group to create.readOffset- the offset to start at.- Returns:
- ok if successful. null when used in pipeline / transaction.
-
xGroupCreate
Description copied from interface:RedisStreamCommandsCreate a consumer group.- Specified by:
xGroupCreatein interfaceDefaultedRedisConnection- Specified by:
xGroupCreatein interfaceRedisStreamCommands- Parameters:
key- the key the stream is stored at.groupName- name of the consumer group to create.readOffset- the offset to start at.mkStream- if true the group will create the stream if not already present (MKSTREAM)- Returns:
- ok if successful. null when used in pipeline / transaction.
-
xGroupDelConsumer
Description copied from interface:RedisStreamCommandsDelete a consumer from a consumer group.- Specified by:
xGroupDelConsumerin interfaceDefaultedRedisConnection- Specified by:
xGroupDelConsumerin interfaceRedisStreamCommands- Parameters:
key- the key the stream is stored at.consumer- consumer identified by group name and consumer name.- Returns:
- true if successful. null when used in pipeline / transaction.
-
xGroupDestroy
Description copied from interface:RedisStreamCommandsDestroy a consumer group.- Specified by:
xGroupDestroyin interfaceDefaultedRedisConnection- Specified by:
xGroupDestroyin interfaceRedisStreamCommands- Parameters:
key- the key the stream is stored at.groupName- name of the consumer group.- Returns:
- true if successful. null when used in pipeline / transaction.
-
xInfo
Description copied from interface:RedisStreamCommandsObtain general information about the stream stored at the specified key.- Specified by:
xInfoin interfaceDefaultedRedisConnection- Specified by:
xInfoin interfaceRedisStreamCommands- Parameters:
key- the key the stream is stored at.- Returns:
- null when used in pipeline / transaction.
-
xInfoGroups
Description copied from interface:RedisStreamCommandsObtain information about consumer groups associated with the stream stored at the specified key.- Specified by:
xInfoGroupsin interfaceDefaultedRedisConnection- Specified by:
xInfoGroupsin interfaceRedisStreamCommands- Parameters:
key- the key the stream is stored at.- Returns:
- null when used in pipeline / transaction.
-
xInfoConsumers
Description copied from interface:RedisStreamCommandsObtain information about every consumer in a specific consumer group for the stream stored at the specified key.- Specified by:
xInfoConsumersin interfaceDefaultedRedisConnection- Specified by:
xInfoConsumersin interfaceRedisStreamCommands- Parameters:
key- the key the stream is stored at.groupName- name of the consumer group.- Returns:
- null when used in pipeline / transaction.
-
xLen
Description copied from interface:RedisStreamCommandsGet the length of a stream.- Specified by:
xLenin interfaceDefaultedRedisConnection- Specified by:
xLenin interfaceRedisStreamCommands- Parameters:
key- the key the stream is stored at.- Returns:
- length of the stream. null when used in pipeline / transaction.
- See Also:
-
xPending
Description copied from interface:RedisStreamCommandsObtain thePendingMessagesSummaryfor a given consumer group.- Specified by:
xPendingin interfaceDefaultedRedisConnection- Specified by:
xPendingin interfaceRedisStreamCommands- Parameters:
key- the key the stream is stored at. Must not be null.groupName- the name of the consumer group. Must not be null.- Returns:
- a summary of pending messages within the given consumer group or null when used in pipeline / transaction.
- See Also:
-
xPending
public PendingMessages xPending(byte[] key, String groupName, RedisStreamCommands.XPendingOptions options) Description copied from interface:RedisStreamCommands- Specified by:
xPendingin interfaceDefaultedRedisConnection- Specified by:
xPendingin interfaceRedisStreamCommands- Parameters:
key- the key the stream is stored at. Must not be null.groupName- the name of the consumer group. Must not be null.options- the options containing range, consumer and count. Must not be null.- Returns:
- pending messages matching given criteria or null when used in pipeline / transaction.
- See Also:
-
xRange
Description copied from interface:RedisStreamCommandsRetrieve alimited numberofrecordswithin a specificRangefrom the stream stored at key.
UseRange.unbounded()to read from the minimum and the maximum ID possible.
UseLimit.unlimited()to read all records.- Specified by:
xRangein interfaceDefaultedRedisConnection- Specified by:
xRangein interfaceRedisStreamCommands- Parameters:
key- the key the stream is stored at.range- must not be null.limit- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
xRead
Description copied from interface:RedisStreamCommandsRead records from one or moreStreamOffsets.- Specified by:
xReadin interfaceDefaultedRedisConnection- Specified by:
xReadin interfaceRedisStreamCommands- Parameters:
readOptions- read arguments.streams- the streams to read from.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
xReadGroup
public List<ByteRecord> xReadGroup(Consumer consumer, StreamReadOptions readOptions, StreamOffset<byte[]>... streams) Description copied from interface:RedisStreamCommandsRead records from one or moreStreamOffsets using a consumer group.- Specified by:
xReadGroupin interfaceDefaultedRedisConnection- Specified by:
xReadGroupin interfaceRedisStreamCommands- Parameters:
consumer- consumer/group.readOptions- read arguments.streams- the streams to read from.- Returns:
- list with members of the resulting stream. null when used in pipeline / transaction.
- See Also:
-
xRevRange
Description copied from interface:RedisStreamCommands- Specified by:
xRevRangein interfaceDefaultedRedisConnection- Specified by:
xRevRangein interfaceRedisStreamCommands- Parameters:
key- the stream key.range- must not be null.limit- must not be null.- Returns:
- list with members of the resulting stream. null when used in pipeline / transaction.
- See Also:
-
xTrim
Description copied from interface:RedisStreamCommandsTrims the stream tocountelements.- Specified by:
xTrimin interfaceDefaultedRedisConnection- Specified by:
xTrimin interfaceRedisStreamCommands- Parameters:
key- the stream key.count- length of the stream.- Returns:
- number of removed entries. null when used in pipeline / transaction.
- See Also:
-
xTrim
Description copied from interface:RedisStreamCommandsTrims the stream tocountelements.- Specified by:
xTrimin interfaceDefaultedRedisConnection- Specified by:
xTrimin interfaceRedisStreamCommands- Parameters:
key- the stream key.count- length of the stream.approximateTrimming- the trimming must be performed in a approximated way in order to maximize performances.- Returns:
- number of removed entries. null when used in pipeline / transaction.
- See Also:
-
setDeserializePipelineAndTxResults
public void setDeserializePipelineAndTxResults(boolean deserializePipelineAndTxResults) Specifies if pipelined and tx results should be deserialized to Strings. If false, results ofclosePipeline()andexec()will be of the type returned by the underlying connection- Parameters:
deserializePipelineAndTxResults- Whether or not to deserialize pipeline and tx results
-
bitField
Description copied from interface:RedisStringCommandsGet / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored at a givenkey.- Specified by:
bitFieldin interfaceDefaultedRedisConnection- Specified by:
bitFieldin interfaceRedisStringCommands- Parameters:
key- must not be null.subCommands- must not be null.- Returns:
- null when used in pipeline / transaction.
-
bitfield
Description copied from interface:StringRedisConnectionGet / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored at a givenkey.- Specified by:
bitfieldin interfaceStringRedisConnection- Parameters:
key- must not be null.operation- must not be null.- Returns:
-
getDelegate
Description copied from interface:DecoratedRedisConnectionGets the underlyingRedisConnection.- Specified by:
getDelegatein interfaceDecoratedRedisConnection- Returns:
- never null.
-