Class BlockingKeyCommandsImpl<K>
java.lang.Object
io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
io.quarkus.redis.runtime.datasource.BlockingKeyCommandsImpl<K>
- All Implemented Interfaces:
KeyCommands<K>,RedisCommands
-
Field Summary
Fields inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
ds, timeout -
Constructor Summary
ConstructorsConstructorDescriptionBlockingKeyCommandsImpl(RedisDataSource ds, ReactiveKeyCommands<K> reactive, Duration timeout) -
Method Summary
Modifier and TypeMethodDescriptionbooleanExecute the command COPY.booleanExecute the command COPY.intExecute the command DEL.Execute the command DUMP.booleanExecute the command EXISTS.intExecute the command EXISTS.booleanExecute the command EXPIRE.booleanexpire(K key, long seconds, ExpireArgs expireArgs) Execute the command EXPIRE.booleanExecute the command EXPIRE.booleanexpire(K key, Duration duration, ExpireArgs expireArgs) Execute the command EXPIRE.booleanExecute the command EXPIREAT.booleanexpireat(K key, long timestamp, ExpireArgs expireArgs) Execute the command EXPIREAT.booleanExecute the command EXPIREAT.booleanexpireat(K key, Instant timestamp, ExpireArgs expireArgs) Execute the command EXPIREAT.longexpiretime(K key) Execute the command EXPIRETIME.Execute the command KEYS.booleanExecute the command MOVE.booleanExecute the command PERSIST.booleanExecute the command PEXPIRE.booleanpexpire(K key, long seconds, ExpireArgs pexpireArgs) Execute the command PEXPIRE.booleanExecute the command PEXPIRE.booleanpexpire(K key, Duration duration, ExpireArgs pexpireArgs) Execute the command PEXPIRE.booleanExecute the command PEXPIREAT.booleanpexpireat(K key, long timestamp, ExpireArgs pexpireArgs) Execute the command PEXPIREAT.booleanExecute the command PEXPIREAT.booleanpexpireat(K key, Instant timestamp, ExpireArgs pexpireArgs) Execute the command PEXPIREAT.longpexpiretime(K key) Execute the command PEXPIRETIME.longExecute the command PTTL.Execute the command RANDOMKEY.voidExecute the command RENAME.booleanExecute the command RENAMENX.scan()Execute the command SCAN.scan(KeyScanArgs args) Execute the command SCAN.intExecute the command TOUCH.longExecute the command TTL.Execute the command TYPE.intExecute the command UNLINK.Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
getDataSourceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.redis.datasource.RedisCommands
getDataSource
-
Constructor Details
-
BlockingKeyCommandsImpl
public BlockingKeyCommandsImpl(RedisDataSource ds, ReactiveKeyCommands<K> reactive, Duration timeout)
-
-
Method Details
-
copy
Description copied from interface:KeyCommandsExecute the command COPY. Summary: Copy a key Group: generic Requires Redis 6.2.0- Specified by:
copyin interfaceKeyCommands<K>- Parameters:
source- the keydestination- the key- Returns:
truesource was copied.falsesource was not copied.
-
copy
Description copied from interface:KeyCommandsExecute the command COPY. Summary: Copy a key Group: generic Requires Redis 6.2.0- Specified by:
copyin interfaceKeyCommands<K>- Parameters:
source- the keydestination- the keycopyArgs- the additional arguments- Returns:
truesource was copied.falsesource was not copied.
-
del
Description copied from interface:KeyCommandsExecute the command DEL. Summary: Delete one or multiple keys Group: generic Requires Redis 1.0.0- Specified by:
delin interfaceKeyCommands<K>- Parameters:
keys- the keys.- Returns:
- The number of keys that were removed.
-
dump
Description copied from interface:KeyCommandsExecute the command DUMP. Summary: Return a serialized version of the value stored at the specified key. Group: generic Requires Redis 2.6.0- Specified by:
dumpin interfaceKeyCommands<K>- Parameters:
key- the key- Returns:
- the serialized value.
-
exists
Description copied from interface:KeyCommandsExecute the command EXISTS. Summary: Determine if a key exists Group: generic Requires Redis 1.0.0- Specified by:
existsin interfaceKeyCommands<K>- Parameters:
key- the key to check- Returns:
trueif the key exists,falseotherwise
-
exists
Description copied from interface:KeyCommandsExecute the command EXISTS. Summary: Determine if a key exists Group: generic Requires Redis 1.0.0- Specified by:
existsin interfaceKeyCommands<K>- Parameters:
keys- the keys to check- Returns:
- the number of keys that exist from those specified as arguments.
-
expire
Description copied from interface:KeyCommandsExecute the command EXPIRE. Summary: Set a key's time to live in seconds Group: generic Requires Redis 1.0.0- Specified by:
expirein interfaceKeyCommands<K>- Parameters:
key- the keyseconds- the new TTLexpireArgs- theEXPIREcommand extra-arguments- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments.
-
expire
Description copied from interface:KeyCommandsExecute the command EXPIRE. Summary: Set a key's time to live in seconds Group: generic Requires Redis 1.0.0- Specified by:
expirein interfaceKeyCommands<K>- Parameters:
key- the keyduration- the new TTLexpireArgs- theEXPIREcommand extra-arguments- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments.
-
expire
Description copied from interface:KeyCommandsExecute the command EXPIRE. Summary: Set a key's time to live in seconds Group: generic Requires Redis 1.0.0- Specified by:
expirein interfaceKeyCommands<K>- Parameters:
key- the keyseconds- the new TTL- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist.
-
expire
Description copied from interface:KeyCommandsExecute the command EXPIRE. Summary: Set a key's time to live in seconds Group: generic Requires Redis 1.0.0- Specified by:
expirein interfaceKeyCommands<K>- Parameters:
key- the keyduration- the new TTL- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist.
-
expireat
Description copied from interface:KeyCommandsExecute the command EXPIREAT. Summary: Set the expiration for a key as a UNIX timestamp Group: generic Requires Redis 1.2.0- Specified by:
expireatin interfaceKeyCommands<K>- Parameters:
key- the keytimestamp- the timestamp- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist.
-
expireat
Description copied from interface:KeyCommandsExecute the command EXPIREAT. Summary: Set the expiration for a key as a UNIX timestamp Group: generic Requires Redis 1.2.0- Specified by:
expireatin interfaceKeyCommands<K>- Parameters:
key- the keytimestamp- the timestamp- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist.
-
expireat
Description copied from interface:KeyCommandsExecute the command EXPIREAT. Summary: Set the expiration for a key as a UNIX timestamp Group: generic Requires Redis 1.2.0- Specified by:
expireatin interfaceKeyCommands<K>- Parameters:
key- the keytimestamp- the timestampexpireArgs- theEXPIREATcommand extra-arguments- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments.
-
expireat
Description copied from interface:KeyCommandsExecute the command EXPIREAT. Summary: Set the expiration for a key as a UNIX timestamp Group: generic Requires Redis 1.2.0- Specified by:
expireatin interfaceKeyCommands<K>- Parameters:
key- the keytimestamp- the timestampexpireArgs- theEXPIREATcommand extra-arguments- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments.
-
expiretime
Description copied from interface:KeyCommandsExecute the command EXPIRETIME. Summary: Get the expiration Unix timestamp for a key Group: generic Requires Redis 7.0.0- Specified by:
expiretimein interfaceKeyCommands<K>- Parameters:
key- the key- Returns:
- the expiration Unix timestamp in seconds,
-1if the key exists but has no associated expiration time.
-
keys
Description copied from interface:KeyCommandsExecute the command KEYS. Summary: Find all keys matching the given pattern Group: generic Requires Redis 1.0.0- Specified by:
keysin interfaceKeyCommands<K>- Parameters:
pattern- the glob-style pattern- Returns:
- the list of keys matching pattern.
-
move
Description copied from interface:KeyCommandsExecute the command MOVE. Summary: Move a key to another database Group: generic Requires Redis 1.0.0- Specified by:
movein interfaceKeyCommands<K>- Parameters:
key- the key- Returns:
truekey was moved.falsekey was not moved.
-
persist
Description copied from interface:KeyCommandsExecute the command PERSIST. Summary: Remove the expiration from a key Group: generic Requires Redis 2.2.0- Specified by:
persistin interfaceKeyCommands<K>- Parameters:
key- the key- Returns:
truethe timeout was removed.falsekey does not exist or does not have an associated timeout.
-
pexpire
Description copied from interface:KeyCommandsExecute the command PEXPIRE. Summary: Set a key's time to live in milliseconds Group: generic Requires Redis 2.6.0- Specified by:
pexpirein interfaceKeyCommands<K>- Parameters:
key- the keyseconds- the new TTLpexpireArgs- thePEXPIREcommand extra-arguments- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist.
-
pexpire
Description copied from interface:KeyCommandsExecute the command PEXPIRE. Summary: Set a key's time to live in milliseconds Group: generic Requires Redis 2.6.0- Specified by:
pexpirein interfaceKeyCommands<K>- Parameters:
key- the keyduration- the new TTLpexpireArgs- thePEXPIREcommand extra-arguments- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments.
-
pexpire
Description copied from interface:KeyCommandsExecute the command PEXPIRE. Summary: Set a key's time to live in milliseconds Group: generic Requires Redis 2.6.0- Specified by:
pexpirein interfaceKeyCommands<K>- Parameters:
key- the keyms- the new TTL- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist.
-
pexpire
Description copied from interface:KeyCommandsExecute the command PEXPIRE. Summary: Set a key's time to live in milliseconds Group: generic Requires Redis 2.6.0- Specified by:
pexpirein interfaceKeyCommands<K>- Parameters:
key- the keyduration- the new TTL- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist.
-
pexpireat
Description copied from interface:KeyCommandsExecute the command PEXPIREAT. Summary: Set the expiration for a key as a UNIX timestamp Group: generic Requires Redis 2.6.0- Specified by:
pexpireatin interfaceKeyCommands<K>- Parameters:
key- the keytimestamp- the timestamp- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist.
-
pexpireat
Description copied from interface:KeyCommandsExecute the command PEXPIREAT. Summary: Set the expiration for a key as a UNIX timestamp Group: generic Requires Redis 2.6.0- Specified by:
pexpireatin interfaceKeyCommands<K>- Parameters:
key- the keytimestamp- the timestamp- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist.
-
pexpireat
Description copied from interface:KeyCommandsExecute the command PEXPIREAT. Summary: Set the expiration for a key as a UNIX timestamp Group: generic Requires Redis 2.6.0- Specified by:
pexpireatin interfaceKeyCommands<K>- Parameters:
key- the keytimestamp- the timestamppexpireArgs- theEXPIREATcommand extra-arguments- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments.
-
pexpireat
Description copied from interface:KeyCommandsExecute the command PEXPIREAT. Summary: Set the expiration for a key as a UNIX timestamp Group: generic Requires Redis 2.6.0- Specified by:
pexpireatin interfaceKeyCommands<K>- Parameters:
key- the keytimestamp- the timestamppexpireArgs- theEXPIREATcommand extra-arguments- Returns:
truethe timeout was set.falsethe timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments.
-
pexpiretime
Description copied from interface:KeyCommandsExecute the command PEXPIRETIME. Summary: Get the expiration Unix timestamp for a key Group: generic Requires Redis 2.6.0- Specified by:
pexpiretimein interfaceKeyCommands<K>- Parameters:
key- the key- Returns:
- the expiration Unix timestamp in milliseconds;
-1if the key exists but has no associated expiration time.
-
pttl
Description copied from interface:KeyCommandsExecute the command PTTL. Summary: Get the time to live for a key in milliseconds Group: generic Requires Redis 2.6.0- Specified by:
pttlin interfaceKeyCommands<K>- Parameters:
key- the key- Returns:
- TTL in milliseconds. The command returns
-1if the key exists but has no associated expire.
-
randomkey
Description copied from interface:KeyCommandsExecute the command RANDOMKEY. Summary: Return a random key from the keyspace Group: generic Requires Redis 1.0.0- Specified by:
randomkeyin interfaceKeyCommands<K>- Returns:
- the random key, or
nullwhen the database is empty.
-
rename
Description copied from interface:KeyCommandsExecute the command RENAME. Summary: Rename a key Group: generic Requires Redis 1.0.0- Specified by:
renamein interfaceKeyCommands<K>- Parameters:
key- the keynewkey- the new key
-
renamenx
Description copied from interface:KeyCommandsExecute the command RENAMENX. Summary: Rename a key, only if the new key does not exist Group: generic Requires Redis 1.0.0- Specified by:
renamenxin interfaceKeyCommands<K>- Parameters:
key- the keynewkey- the new key- Returns:
trueifkeywas renamed tonewkey.falseifnewkeyalready exists.
-
scan
Description copied from interface:KeyCommandsExecute the command SCAN. Summary: Incrementally iterate the keys space Group: generic Requires Redis 2.8.0- Specified by:
scanin interfaceKeyCommands<K>- Returns:
- the cursor.
-
scan
Description copied from interface:KeyCommandsExecute the command SCAN. Summary: Incrementally iterate the keys space Group: generic Requires Redis 2.8.0- Specified by:
scanin interfaceKeyCommands<K>- Parameters:
args- the extra arguments- Returns:
- the cursor.
-
touch
Description copied from interface:KeyCommandsExecute the command TOUCH. Summary: Alters the last access time of a key(s). Returns the number of existing keys specified. Group: generic Requires Redis 3.2.1- Specified by:
touchin interfaceKeyCommands<K>- Parameters:
keys- the keys- Returns:
- The number of keys that were touched.
-
ttl
Description copied from interface:KeyCommandsExecute the command TTL. Summary: Get the time to live for a key in seconds Group: generic Requires Redis 1.0.0- Specified by:
ttlin interfaceKeyCommands<K>- Parameters:
key- the key- Returns:
- TTL in seconds,
-1if the key exists but has no associated expire.
-
type
Description copied from interface:KeyCommandsExecute the command TYPE. Summary: Determine the type stored at key Group: generic Requires Redis 1.0.0- Specified by:
typein interfaceKeyCommands<K>- Parameters:
key- the key- Returns:
- type of key, or
NONEwhen key does not exist.
-
unlink
Description copied from interface:KeyCommandsExecute the command UNLINK. Summary: Delete a key asynchronously in another thread. Otherwise, it is just asDEL, but non-blocking. Group: generic Requires Redis 4.0.0- Specified by:
unlinkin interfaceKeyCommands<K>- Parameters:
keys- the keys- Returns:
- The number of keys that were unlinked.
-