Java org.springframework.data.redis.connection RedisConnection fields, constructors, methods, implement or subclass

Example usage for Java org.springframework.data.redis.connection RedisConnection fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.springframework.data.redis.connection RedisConnection.

The text is from its open source code.

Method

Longappend(byte[] key, byte[] value)
Append a value to key .
voidbgReWriteAof()
Start an Append Only File rewrite process on server.
voidbgSave()
Start background saving of db on server.
voidbgWriteAof()
Start an Append Only File rewrite process on server.
LongbitCount(byte[] key)
Count the number of set bits (population counting) in value stored at key .
LongbitCount(byte[] key, long start, long end)
Count the number of set bits (population counting) of value stored at key between start and end .
LongbitOp(BitOperation op, byte[] destination, byte[]... keys)
Perform bitwise operations between strings.
ListbLPop(int timeout, byte[]... keys)
Removes and returns first element from lists stored at keys .
ListbRPop(int timeout, byte[]... keys)
Removes and returns last element from lists stored at keys .
byte[]bRPopLPush(int timeout, byte[] srcKey, byte[] dstKey)
Remove the last element from list at srcKey , append it to dstKey and return its value.
voidclose()
Closes (or quits) the connection.
ListclosePipeline()
Executes the commands in the pipeline and returns their result.
LongdbSize()
Get the total number of available keys in currently selected database.
Longdecr(byte[] key)
Decrement an integer value stored as string value of key by 1.
LongdecrBy(byte[] key, long value)
Decrement an integer value stored as string value of key by value .
Longdel(byte[]... keys)
Delete given keys .
voiddiscard()
Discard all commands issued after #multi() .
byte[]dump(byte[] key)
Retrieve serialized version of the value stored at key .
byte[]echo(byte[] message)
Returns message via server roundtrip.
Teval(byte[] script, ReturnType returnType, int numKeys, byte[]... keysAndArgs)
Evaluate given script .
TevalSha(String scriptSha, ReturnType returnType, int numKeys, byte[]... keysAndArgs)
Evaluate given scriptSha .
Listexec()
Executes all queued commands in a transaction started with #multi() .
Objectexecute(String command, byte[]... args)
'Native' or 'raw' execution of the given command along-side the given arguments.
Booleanexists(byte[] key)
Determine if given key exists.
Booleanexpire(byte[] key, long seconds)
Set time to live for given key in seconds.
BooleanexpireAt(byte[] key, long unixTime)
Set the expiration for given key as a UNIX timestamp.
voidflushAll()
Delete all all keys from all databases.
voidflushDb()
Delete all keys of the currently selected database.
byte[]get(byte[] key)
Get the value of key .
BooleangetBit(byte[] key, long offset)
Get the bit value at offset of value at key .
ListgetClientList()
Request information and statistics about connected clients.
StringgetClientName()
Returns the name of the current connection.
PropertiesgetConfig(String pattern)
Load configuration parameters for given pattern from server.
ObjectgetNativeConnection()
Returns the native connection (the underlying library/driver object).
byte[]getRange(byte[] key, long start, long end)
Get a substring of value of key between start and end .
byte[]getSet(byte[] key, byte[] value)
Set value of key and return its old value.
SubscriptiongetSubscription()
Returns the current subscription for this connection or null if the connection is not subscribed.
LonghDel(byte[] key, byte[]... fields)
Delete given hash fields .
BooleanhExists(byte[] key, byte[] field)
Determine if given hash field exists.
byte[]hGet(byte[] key, byte[] field)
Get value for given field from hash at key .
MaphGetAll(byte[] key)
Get entire hash stored at key .
LonghIncrBy(byte[] key, byte[] field, long delta)
Increment value of a hash field by the given delta .
SethKeys(byte[] key)
Get key set (fields) of hash at key .
LonghLen(byte[] key)
Get size of hash at key .
ListhMGet(byte[] key, byte[]... fields)
Get values for given fields from hash at key .
voidhMSet(byte[] key, Map hashes)
Set multiple hash fields to multiple values using data provided in hashes
Cursor>hScan(byte[] key, ScanOptions options)
Use a Cursor to iterate over entries in hash at key .
BooleanhSet(byte[] key, byte[] field, byte[] value)
Set the value of a hash field .
BooleanhSetNX(byte[] key, byte[] field, byte[] value)
Set the value of a hash field only if field does not exist.
ListhVals(byte[] key)
Get entry set (values) of hash at field .
Longincr(byte[] key)
Increment an integer value stored as string value of key by 1.
LongincrBy(byte[] key, long value)
Increment an integer value stored of key by delta .
Propertiesinfo()
Load default server information like
  • memory
  • cpu utilization
  • replication

Propertiesinfo(String section)
Load server information for given selection .
booleanisClosed()
Indicates whether the underlying connection is closed or not.
booleanisSubscribed()
Indicates whether the current connection is subscribed (to at least one channel) or not.
Setkeys(byte[] pattern)
Find all keys matching the given pattern .
voidkillClient(String host, int port)
Closes a given client connection identified by host:port .
LonglastSave()
Get time of last #bgSave() operation in seconds.
byte[]lIndex(byte[] key, long index)
Get element at index form list at key .
LonglInsert(byte[] key, Position where, byte[] pivot, byte[] value)
Insert value Position#BEFORE or Position#AFTER existing pivot for key .
LonglLen(byte[] key)
Get the size of list stored at key .
byte[]lPop(byte[] key)
Removes and returns first element in list stored at key .
LonglPush(byte[] key, byte[]... values)
Prepend values to key .
LonglPushX(byte[] key, byte[] value)
Prepend values to key only if the list exists.
ListlRange(byte[] key, long start, long end)
Get elements between start and end from list at key .
LonglRem(byte[] key, long count, byte[] value)
Removes the first count occurrences of value from the list stored at key .
voidlSet(byte[] key, long index, byte[] value)
Set the value list element at index .
voidlTrim(byte[] key, long start, long end)
Trim list at key to elements between start and end .
ListmGet(byte[]... keys)
Get multiple keys .
voidmigrate(byte[] key, RedisNode target, int dbIndex, @Nullable MigrateOption option)
Atomically transfer a key from a source Redis instance to a destination Redis instance.
voidmigrate(byte[] key, RedisNode target, int dbIndex, @Nullable MigrateOption option, long timeout)
Atomically transfer a key from a source Redis instance to a destination Redis instance.
Booleanmove(byte[] key, int dbIndex)
Move given key to database with index .
BooleanmSet(Map tuple)
Set multiple keys to multiple values using key-value pairs provided in tuple .
BooleanmSetNX(Map tuple)
Set multiple keys to multiple values using key-value pairs provided in tuple only if the provided key does not exist.
voidmulti()
Mark the start of a transaction block.
voidopenPipeline()
Activates the pipeline mode for this connection.
Booleanpersist(byte[] key)
Remove the expiration from given key .
BooleanpExpire(byte[] key, long millis)
Set time to live for given key in milliseconds.
BooleanpExpireAt(byte[] key, long unixTimeInMillis)
Set the expiration for given key as a UNIX timestamp in milliseconds.
LongpfAdd(byte[] key, byte[]... values)
Adds given values to the HyperLogLog stored at given key .
LongpfCount(byte[]... keys)
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 .
Stringping()
Test connection.
BooleanpSetEx(byte[] key, long milliseconds, byte[] value)
Set the value and expiration in milliseconds for key .
voidpSubscribe(MessageListener listener, byte[]... patterns)
Subscribes the connection to all channels matching the given patterns.
LongpTtl(byte[] key)
Get the precise time to live for key in milliseconds.
Longpublish(byte[] channel, byte[] message)
Publishes the given message to the given channel.
byte[]randomKey()
Return a random key from the keyspace.
voidrename(byte[] sourceKey, byte[] targetKey)
Rename key sourceKey to targetKey .
BooleanrenameNX(byte[] sourceKey, byte[] targetKey)
Rename key sourceKey to targetKey only if targetKey does not exist.
voidresetConfigStats()
Reset statistic counters on server.
voidrestore(byte[] key, long ttlInMillis, byte[] serializedValue)
Create key using the serializedValue , previously obtained using #dump(byte[]) .
byte[]rPop(byte[] key)
Removes and returns last element in list stored at key .
byte[]rPopLPush(byte[] srcKey, byte[] dstKey)
Remove the last element from list at srcKey , append it to dstKey and return its value.
LongrPush(byte[] key, byte[]... values)
Append values to key .
LongrPushX(byte[] key, byte[] value)
Append values to key only if the list exists.
LongsAdd(byte[] key, byte[]... values)
Add given values to set at key .
voidsave()
Synchronous save current db snapshot on server.
Cursorscan(ScanOptions options)
Use a Cursor to iterate over keys.
LongsCard(byte[] key)
Get size of set at key .
ListscriptExists(String... scriptShas)
Check if given scriptShas exist in script cache.
voidscriptFlush()
Flush lua script cache.
voidscriptKill()
Kill current lua script execution.
StringscriptLoad(byte[] script)
Load lua script into scripts cache, without executing it.
Execute the script by calling #evalSha(byte[], ReturnType, int, byte[]...) .
SetsDiff(byte[]... keys)
Diff all sets for given keys .
LongsDiffStore(byte[] destKey, byte[]... keys)
Diff all sets for given keys and store result in destKey .
voidselect(int dbIndex)
Select the DB with given positive dbIndex .
Booleanset(byte[] key, byte[] value)
Set value for key .
Booleanset(byte[] key, byte[] value, Expiration expiration, SetOption option)
Set value for key applying timeouts from expiration if set and inserting/updating values depending on option .
BooleansetBit(byte[] key, long offset, boolean value)
Sets the bit at offset in value stored at key .
voidsetClientName(byte[] name)
Assign given name to current connection.
voidsetConfig(String param, String value)
Set server configuration for param to value .
BooleansetEx(byte[] key, long seconds, byte[] value)
Set the value and expiration in seconds for key .
BooleansetNX(byte[] key, byte[] value)
Set value for key , only if key does not exist.
voidsetRange(byte[] key, byte[] value, long offset)
Overwrite parts of key starting at the specified offset with given value .
voidshutdown()
Shutdown server.
voidshutdown(ShutdownOption option)
Shutdown server.
SetsInter(byte[]... keys)
Returns the members intersecting all given sets at keys .
LongsInterStore(byte[] destKey, byte[]... keys)
Intersect all given sets at keys and store result in destKey .
BooleansIsMember(byte[] key, byte[] value)
Check if set at key contains value .
voidslaveOf(String host, int port)
Change redis replication setting to new master.
voidslaveOfNoOne()
Change server into master.
SetsMembers(byte[] key)
Get all elements of set at key .
BooleansMove(byte[] srcKey, byte[] destKey, byte[] value)
Move value from srcKey to destKey
Listsort(byte[] key, SortParameters params)
Sort the elements for key .
Longsort(byte[] key, SortParameters params, byte[] storeKey)
Sort the elements for key and store result in storeKey .
byte[]sPop(byte[] key)
Remove and return a random member from set at key .
byte[]sRandMember(byte[] key)
Get random element from set at key .
ListsRandMember(byte[] key, long count)
Get count random elements from set at key .
LongsRem(byte[] key, byte[]... values)
Remove given values from set at key and return the number of removed elements.
CursorsScan(byte[] key, ScanOptions options)
Use a Cursor to iterate over elements in set at key .
LongstrLen(byte[] key)
Get the length of the value stored at key .
voidsubscribe(MessageListener listener, byte[]... channels)
Subscribes the connection to the given channels.
SetsUnion(byte[]... keys)
Union all sets at given keys .
LongsUnionStore(byte[] destKey, byte[]... keys)
Union all sets at given keys and store result in destKey .
Longtime()
Request server timestamp using TIME command.
Longttl(byte[] key)
Get the time to live for key in seconds.
DataTypetype(byte[] key)
Determine the type stored at key .
voidunwatch()
Flushes all the previously #watch(byte[]...) keys.
voidwatch(byte[]... keys)
Watch given keys for modifications during transaction started with #multi() .
BooleanzAdd(byte[] key, double score, byte[] value)
Add value to a sorted set at key , or update its score if it already exists.
LongzAdd(byte[] key, Set tuples)
Add tuples to a sorted set at key , or update its score if it already exists.
LongzCard(byte[] key)
Get the size of sorted set with key .
LongzCount(byte[] key, double min, double max)
Count number of elements within sorted set with scores between min and max .
LongzCount(byte[] key, Range range)
Count number of elements within sorted set with scores between Range#min and Range#max .
DoublezIncrBy(byte[] key, double increment, byte[] value)
Increment the score of element with value in sorted set by increment .
LongzInterStore(byte[] destKey, byte[]... sets)
Intersect sorted sets and store result in destination key .
LongzInterStore(byte[] destKey, Aggregate aggregate, int[] weights, byte[]... sets)
Intersect sorted sets and store result in destination key .
SetzRange(byte[] key, long start, long end)
Get elements between start and end from sorted set.
SetzRangeByLex(byte[] key, Range range)
Get all the elements in Range from the sorted set at key in lexicographical ordering.
SetzRangeByLex(byte[] key)
Get all the elements in the sorted set at key in lexicographical ordering.
SetzRangeByLex(byte[] key, Range range, Limit limit)
Get all the elements in Range from the sorted set at key in lexicographical ordering.
SetzRangeByScore(byte[] key, double min, double max)
Get elements where score is between min and max from sorted set.
SetzRangeByScore(byte[] key, double min, double max, long offset, long count)
Get elements in range from start to end where score is between min and max from sorted set.
SetzRangeByScore(byte[] key, Range range)
Get elements where score is between Range#min and Range#max from sorted set.
SetzRangeByScoreWithScores(byte[] key, double min, double max)
Get set of Tuple s where score is between min and max from sorted set.
SetzRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count)
Get set of Tuple s in range from start to end where score is between min and max from sorted set.
SetzRangeByScoreWithScores(byte[] key, Range range)
Get set of Tuple s where score is between Range#min and Range#max from sorted set.
SetzRangeWithScores(byte[] key, long start, long end)
Get set of Tuple s between start and end from sorted set.
LongzRank(byte[] key, byte[] value)
Determine the index of element with value in a sorted set.
LongzRem(byte[] key, byte[]... values)
Remove values from sorted set.
LongzRemRange(byte[] key, long start, long end)
Remove elements in range between start and end from sorted set with key .
LongzRemRangeByScore(byte[] key, double min, double max)
Remove elements with scores between min and max from sorted set with key .
LongzRemRangeByScore(byte[] key, Range range)
Remove elements with scores between Range#min and Range#max from sorted set with key .
SetzRevRange(byte[] key, long start, long end)
Get elements in range from start to end from sorted set ordered from high to low.
SetzRevRangeByScore(byte[] key, double min, double max)
Get elements where score is between min and max from sorted set ordered from high to low.
SetzRevRangeByScore(byte[] key, double min, double max, long offset, long count)
Get elements in range from start to end where score is between min and max from sorted set ordered high -> low.
SetzRevRangeByScore(byte[] key, Range range)
Get elements where score is between Range#min and Range#max from sorted set ordered from high to low.
SetzRevRangeByScoreWithScores(byte[] key, double min, double max)
Get set of Tuple where score is between min and max from sorted set ordered from high to low.
SetzRevRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count)
Get set of Tuple in range from start to end where score is between min and max from sorted set ordered high -> low.
SetzRevRangeByScoreWithScores(byte[] key, Range range)
Get set of Tuple where score is between Range#min and Range#max from sorted set ordered from high to low.
SetzRevRangeWithScores(byte[] key, long start, long end)
Get set of Tuple s in range from start to end from sorted set ordered from high to low.
LongzRevRank(byte[] key, byte[] value)
Determine the index of element with value in a sorted set when scored high to low.
CursorzScan(byte[] key, ScanOptions options)
Use a Cursor to iterate over elements in sorted set at key .
DoublezScore(byte[] key, byte[] value)
Get the score of element with value from sorted set with key key .
LongzUnionStore(byte[] destKey, byte[]... sets)
Union sorted sets and store result in destination key .
LongzUnionStore(byte[] destKey, Aggregate aggregate, int[] weights, byte[]... sets)
Union sorted sets and store result in destination key .