K
- Key type.V
- Value type.public interface NodeSelectionKeyCommands<K,V>
Modifier and Type | Method and Description |
---|---|
Executions<Long> |
del(K... keys)
Delete one or more keys.
|
Executions<byte[]> |
dump(K key)
Return a serialized version of the value stored at the specified key.
|
Executions<Long> |
exists(K... keys)
Determine how many keys exist.
|
Executions<Boolean> |
expire(K key,
long seconds)
Set a key's time to live in seconds.
|
Executions<Boolean> |
expireat(K key,
Date timestamp)
Set the expiration for a key as a UNIX timestamp.
|
Executions<Boolean> |
expireat(K key,
long timestamp)
Set the expiration for a key as a UNIX timestamp.
|
Executions<List<K>> |
keys(K pattern)
Find all keys matching the given pattern.
|
Executions<Long> |
keys(KeyStreamingChannel<K> channel,
K pattern)
Find all keys matching the given pattern.
|
Executions<String> |
migrate(String host,
int port,
int db,
long timeout,
MigrateArgs<K> migrateArgs)
Atomically transfer one or more keys from a Redis instance to another one.
|
Executions<String> |
migrate(String host,
int port,
K key,
int db,
long timeout)
Atomically transfer a key from a Redis instance to another one.
|
Executions<Boolean> |
move(K key,
int db)
Move a key to another database.
|
Executions<String> |
objectEncoding(K key)
returns the kind of internal representation used in order to store the value associated with a key.
|
Executions<Long> |
objectIdletime(K key)
returns the number of seconds since the object stored at the specified key is idle (not requested by read or write
operations).
|
Executions<Long> |
objectRefcount(K key)
returns the number of references of the value associated with the specified key.
|
Executions<Boolean> |
persist(K key)
Remove the expiration from a key.
|
Executions<Boolean> |
pexpire(K key,
long milliseconds)
Set a key's time to live in milliseconds.
|
Executions<Boolean> |
pexpireat(K key,
Date timestamp)
Set the expiration for a key as a UNIX timestamp specified in milliseconds.
|
Executions<Boolean> |
pexpireat(K key,
long timestamp)
Set the expiration for a key as a UNIX timestamp specified in milliseconds.
|
Executions<Long> |
pttl(K key)
Get the time to live for a key in milliseconds.
|
Executions<V> |
randomkey()
Return a random key from the keyspace.
|
Executions<String> |
rename(K key,
K newKey)
Rename a key.
|
Executions<Boolean> |
renamenx(K key,
K newKey)
Rename a key, only if the new key does not exist.
|
Executions<String> |
restore(K key,
byte[] value,
RestoreArgs args)
Create a key using the provided serialized value, previously obtained using DUMP.
|
Executions<String> |
restore(K key,
long ttl,
byte[] value)
Create a key using the provided serialized value, previously obtained using DUMP.
|
Executions<KeyScanCursor<K>> |
scan()
Incrementally iterate the keys space.
|
Executions<StreamScanCursor> |
scan(KeyStreamingChannel<K> channel)
Incrementally iterate the keys space.
|
Executions<StreamScanCursor> |
scan(KeyStreamingChannel<K> channel,
ScanArgs scanArgs)
Incrementally iterate the keys space.
|
Executions<StreamScanCursor> |
scan(KeyStreamingChannel<K> channel,
ScanCursor scanCursor)
Incrementally iterate the keys space.
|
Executions<StreamScanCursor> |
scan(KeyStreamingChannel<K> channel,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate the keys space.
|
Executions<KeyScanCursor<K>> |
scan(ScanArgs scanArgs)
Incrementally iterate the keys space.
|
Executions<KeyScanCursor<K>> |
scan(ScanCursor scanCursor)
Incrementally iterate the keys space.
|
Executions<KeyScanCursor<K>> |
scan(ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate the keys space.
|
Executions<List<V>> |
sort(K key)
Sort the elements in a list, set or sorted set.
|
Executions<List<V>> |
sort(K key,
SortArgs sortArgs)
Sort the elements in a list, set or sorted set.
|
Executions<Long> |
sort(ValueStreamingChannel<V> channel,
K key)
Sort the elements in a list, set or sorted set.
|
Executions<Long> |
sort(ValueStreamingChannel<V> channel,
K key,
SortArgs sortArgs)
Sort the elements in a list, set or sorted set.
|
Executions<Long> |
sortStore(K key,
SortArgs sortArgs,
K destination)
Sort the elements in a list, set or sorted set.
|
Executions<Long> |
touch(K... keys)
Touch one or more keys.
|
Executions<Long> |
ttl(K key)
Get the time to live for a key.
|
Executions<String> |
type(K key)
Determine the type stored at key.
|
Executions<Long> |
unlink(K... keys)
Unlink one or more keys (non blocking DEL).
|
Executions<Long> del(K... keys)
keys
- the keysExecutions<Long> unlink(K... keys)
keys
- the keysExecutions<byte[]> dump(K key)
key
- the keyExecutions<Long> exists(K... keys)
keys
- the keysExecutions<Boolean> expire(K key, long seconds)
key
- the keyseconds
- the seconds type: longkey
does not exist or the timeout could not
be set.Executions<Boolean> expireat(K key, Date timestamp)
key
- the keytimestamp
- the timestamp type: posix timekey
does not exist or the timeout could not
be set (see: EXPIRE
).Executions<Boolean> expireat(K key, long timestamp)
key
- the keytimestamp
- the timestamp type: posix timekey
does not exist or the timeout could not
be set (see: EXPIRE
).Executions<List<K>> keys(K pattern)
pattern
- the pattern type: patternkey (pattern)pattern
.Executions<Long> keys(KeyStreamingChannel<K> channel, K pattern)
channel
- the channelpattern
- the patternpattern
.Executions<String> migrate(String host, int port, K key, int db, long timeout)
host
- the hostport
- the portkey
- the keydb
- the databasetimeout
- the timeout in millisecondsExecutions<String> migrate(String host, int port, int db, long timeout, MigrateArgs<K> migrateArgs)
host
- the hostport
- the portdb
- the databasetimeout
- the timeout in millisecondsmigrateArgs
- migrate args that allow to configure further optionsExecutions<Boolean> move(K key, int db)
key
- the keydb
- the db type: longExecutions<String> objectEncoding(K key)
key
- the keyExecutions<Long> objectIdletime(K key)
key
- the keyExecutions<Long> objectRefcount(K key)
key
- the keyExecutions<Boolean> persist(K key)
key
- the keykey
does not exist or does not have an
associated timeout.Executions<Boolean> pexpire(K key, long milliseconds)
key
- the keymilliseconds
- the milliseconds type: longkey
does not exist or the timeout could not
be set.Executions<Boolean> pexpireat(K key, Date timestamp)
key
- the keytimestamp
- the milliseconds-timestamp type: posix timekey
does not exist or the timeout could not
be set (see: EXPIRE
).Executions<Boolean> pexpireat(K key, long timestamp)
key
- the keytimestamp
- the milliseconds-timestamp type: posix timekey
does not exist or the timeout could not
be set (see: EXPIRE
).Executions<Long> pttl(K key)
key
- the keyExecutions<V> randomkey()
Executions<String> rename(K key, K newKey)
key
- the keynewKey
- the newkey type: keyExecutions<Boolean> renamenx(K key, K newKey)
key
- the keynewKey
- the newkey type: keykey
was renamed to newkey
. false if newkey
already exists.Executions<String> restore(K key, long ttl, byte[] value)
key
- the keyttl
- the ttl type: longvalue
- the serialized-value type: stringExecutions<String> restore(K key, byte[] value, RestoreArgs args)
key
- the keyvalue
- the serialized-value type: stringargs
- the RestoreArgs
, must not be null.Executions<List<V>> sort(K key)
key
- the keyExecutions<Long> sort(ValueStreamingChannel<V> channel, K key)
channel
- streaming channel that receives a call for every valuekey
- the keyExecutions<List<V>> sort(K key, SortArgs sortArgs)
key
- the keysortArgs
- sort argumentsExecutions<Long> sort(ValueStreamingChannel<V> channel, K key, SortArgs sortArgs)
channel
- streaming channel that receives a call for every valuekey
- the keysortArgs
- sort argumentsExecutions<Long> sortStore(K key, SortArgs sortArgs, K destination)
key
- the keysortArgs
- sort argumentsdestination
- the destination key to store sort resultsExecutions<Long> touch(K... keys)
keys
- the keysExecutions<Long> ttl(K key)
key
- the keyExecutions<String> type(K key)
key
- the keykey
, or none
when key
does not exist.Executions<KeyScanCursor<K>> scan()
Executions<KeyScanCursor<K>> scan(ScanArgs scanArgs)
scanArgs
- scan argumentsExecutions<KeyScanCursor<K>> scan(ScanCursor scanCursor, ScanArgs scanArgs)
scanCursor
- cursor to resume from a previous scan, must not be nullscanArgs
- scan argumentsExecutions<KeyScanCursor<K>> scan(ScanCursor scanCursor)
scanCursor
- cursor to resume from a previous scan, must not be nullExecutions<StreamScanCursor> scan(KeyStreamingChannel<K> channel)
channel
- streaming channel that receives a call for every keyExecutions<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanArgs scanArgs)
channel
- streaming channel that receives a call for every keyscanArgs
- scan argumentsExecutions<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor, ScanArgs scanArgs)
channel
- streaming channel that receives a call for every keyscanCursor
- cursor to resume from a previous scan, must not be nullscanArgs
- scan argumentsExecutions<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor)
channel
- streaming channel that receives a call for every keyscanCursor
- cursor to resume from a previous scan, must not be nullCopyright © 2020 lettuce.io. All rights reserved.