K - Key type.V - Value type.public interface NodeSelectionHashAsyncCommands<K,V>
| Modifier and Type | Method and Description |
|---|---|
AsyncExecutions<Long> |
hdel(K key,
K... fields)
Delete one or more hash fields.
|
AsyncExecutions<Boolean> |
hexists(K key,
K field)
Determine if a hash field exists.
|
AsyncExecutions<List<Long>> |
hexpire(K key,
Duration seconds,
ExpireArgs expireArgs,
K... fields)
Set the time to live for one or more fields, belonging to a certain key.
|
AsyncExecutions<List<Long>> |
hexpire(K key,
Duration seconds,
K... fields)
Set the time to live for one or more fields, belonging to a certain key.
|
AsyncExecutions<List<Long>> |
hexpire(K key,
long seconds,
ExpireArgs expireArgs,
K... fields)
Set the time to live (in seconds) for one or more fields, belonging to a certain key.
|
AsyncExecutions<List<Long>> |
hexpire(K key,
long seconds,
K... fields)
Set the time to live (in seconds) for one or more fields, belonging to a certain key.
|
AsyncExecutions<List<Long>> |
hexpireat(K key,
Date timestamp,
ExpireArgs expireArgs,
K... fields)
Set the time to live for one or more fields, belonging to a certain key as a UNIX timestamp.
|
AsyncExecutions<List<Long>> |
hexpireat(K key,
Date timestamp,
K... fields)
Set the time to live for one or more fields, belonging to a certain key as a UNIX timestamp.
|
AsyncExecutions<List<Long>> |
hexpireat(K key,
Instant timestamp,
ExpireArgs expireArgs,
K... fields)
Set the time to live for one or more fields, belonging to a certain key as a UNIX timestamp.
|
AsyncExecutions<List<Long>> |
hexpireat(K key,
Instant timestamp,
K... fields)
Set the time to live for one or more fields, belonging to a certain key as a UNIX timestamp.
|
AsyncExecutions<List<Long>> |
hexpireat(K key,
long timestamp,
ExpireArgs expireArgs,
K... fields)
Set the time to live for one or more fields, belonging to a certain key as a UNIX timestamp.
|
AsyncExecutions<List<Long>> |
hexpireat(K key,
long timestamp,
K... fields)
Set the time to live for one or more fields, belonging to a certain key as a UNIX timestamp.
|
AsyncExecutions<List<Long>> |
hexpiretime(K key,
K... fields)
Get the time to live for one or more fields in as UNIX timestamp in seconds.
|
AsyncExecutions<V> |
hget(K key,
K field)
Get the value of a hash field.
|
AsyncExecutions<Map<K,V>> |
hgetall(K key)
Get all the fields and values in a hash.
|
AsyncExecutions<Long> |
hgetall(KeyValueStreamingChannel<K,V> channel,
K key)
Stream over all the fields and values in a hash.
|
AsyncExecutions<Long> |
hgetdel(KeyValueStreamingChannel<K,V> channel,
K key,
K... fields)
Stream over the values of all the given hash fields.
|
AsyncExecutions<List<KeyValue<K,V>>> |
hgetdel(K key,
K... fields)
Get and delete one or more hash fields.
|
AsyncExecutions<Long> |
hgetex(KeyValueStreamingChannel<K,V> channel,
K key,
HGetExArgs hGetExArgs,
K... fields)
Stream over the values of all the given hash fields.
|
AsyncExecutions<List<KeyValue<K,V>>> |
hgetex(K key,
HGetExArgs hGetExArgs,
K... fields)
Get the value of one or more fields of a given hash key, and optionally set their expiration
|
AsyncExecutions<List<KeyValue<K,V>>> |
hgetex(K key,
K... fields)
Get the value of one or more fields of a given hash key, and optionally set their expiration
|
AsyncExecutions<String> |
himportSet(K key,
HashImport<K> fieldset,
V... values)
Create the hash stored at
key from fieldset, sending only the values, positionally paired to the
fieldset's field names. |
AsyncExecutions<Long> |
hincrby(K key,
K field,
long amount)
Increment the integer value of a hash field by the given number.
|
AsyncExecutions<Double> |
hincrbyfloat(K key,
K field,
double amount)
Increment the float value of a hash field by the given amount.
|
AsyncExecutions<List<K>> |
hkeys(K key)
Get all the fields in a hash.
|
AsyncExecutions<Long> |
hkeys(KeyStreamingChannel<K> channel,
K key)
Stream over all the fields in a hash.
|
AsyncExecutions<Long> |
hlen(K key)
Get the number of fields in a hash.
|
AsyncExecutions<Long> |
hmget(KeyValueStreamingChannel<K,V> channel,
K key,
K... fields)
Stream over the values of all the given hash fields.
|
AsyncExecutions<List<KeyValue<K,V>>> |
hmget(K key,
K... fields)
Get the values of all the given hash fields.
|
AsyncExecutions<String> |
hmset(K key,
Map<K,V> map)
Deprecated.
since 7.7, use
hset(java.lang.Object, java.util.Map) instead. This command is deprecated by Redis
since version 4.0.0. |
AsyncExecutions<List<Long>> |
hpersist(K key,
K... fields)
Remove the expiration from one or more fields.
|
AsyncExecutions<List<Long>> |
hpexpire(K key,
Duration milliseconds,
ExpireArgs expireArgs,
K... fields)
Set the time to live for one or more fields in milliseconds.
|
AsyncExecutions<List<Long>> |
hpexpire(K key,
Duration milliseconds,
K... fields)
Set the time to live for one or more fields in milliseconds.
|
AsyncExecutions<List<Long>> |
hpexpire(K key,
long milliseconds,
ExpireArgs expireArgs,
K... fields)
Set the time to live for one or more fields in milliseconds.
|
AsyncExecutions<List<Long>> |
hpexpire(K key,
long milliseconds,
K... fields)
Set the time to live for one or more fields in milliseconds.
|
AsyncExecutions<List<Long>> |
hpexpireat(K key,
Date timestamp,
ExpireArgs expireArgs,
K... fields)
Set the time to live for one or more fields as a UNIX timestamp specified in milliseconds.
|
AsyncExecutions<List<Long>> |
hpexpireat(K key,
Date timestamp,
K... fields)
Set the time to live for one or more fields as a UNIX timestamp specified in milliseconds.
|
AsyncExecutions<List<Long>> |
hpexpireat(K key,
Instant timestamp,
ExpireArgs expireArgs,
K... fields)
Set the time to live for one or more fields as a UNIX timestamp specified in milliseconds.
|
AsyncExecutions<List<Long>> |
hpexpireat(K key,
Instant timestamp,
K... fields)
Set the time to live for one or more fields as a UNIX timestamp specified in milliseconds.
|
AsyncExecutions<List<Long>> |
hpexpireat(K key,
long timestamp,
ExpireArgs expireArgs,
K... fields)
Set the time to live for one or more fields as a UNIX timestamp specified in milliseconds.
|
AsyncExecutions<List<Long>> |
hpexpireat(K key,
long timestamp,
K... fields)
Set the time to live for one or more fields as a UNIX timestamp specified in milliseconds.
|
AsyncExecutions<List<Long>> |
hpexpiretime(K key,
K... fields)
Get the time to live for one or more fields as UNIX timestamp in milliseconds.
|
AsyncExecutions<List<Long>> |
hpttl(K key,
K... fields)
Get the time to live for one or more fields in milliseconds.
|
AsyncExecutions<K> |
hrandfield(K key)
Return a random field from the hash stored at
key. |
AsyncExecutions<List<K>> |
hrandfield(K key,
long count)
Return
count random fields from the hash stored at key. |
AsyncExecutions<KeyValue<K,V>> |
hrandfieldWithvalues(K key)
Return a random field along its value from the hash stored at
key. |
AsyncExecutions<List<KeyValue<K,V>>> |
hrandfieldWithvalues(K key,
long count)
Return
count random fields along their value from the hash stored at key. |
AsyncExecutions<MapScanCursor<K,V>> |
hscan(K key)
Incrementally iterate hash fields and associated values.
|
AsyncExecutions<StreamScanCursor> |
hscan(KeyValueStreamingChannel<K,V> channel,
K key)
Incrementally iterate hash fields and associated values.
|
AsyncExecutions<StreamScanCursor> |
hscan(KeyValueStreamingChannel<K,V> channel,
K key,
ScanArgs scanArgs)
Incrementally iterate hash fields and associated values.
|
AsyncExecutions<StreamScanCursor> |
hscan(KeyValueStreamingChannel<K,V> channel,
K key,
ScanCursor scanCursor)
Incrementally iterate hash fields and associated values.
|
AsyncExecutions<StreamScanCursor> |
hscan(KeyValueStreamingChannel<K,V> channel,
K key,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate hash fields and associated values.
|
AsyncExecutions<MapScanCursor<K,V>> |
hscan(K key,
ScanArgs scanArgs)
Incrementally iterate hash fields and associated values.
|
AsyncExecutions<MapScanCursor<K,V>> |
hscan(K key,
ScanCursor scanCursor)
Incrementally iterate hash fields and associated values.
|
AsyncExecutions<MapScanCursor<K,V>> |
hscan(K key,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate hash fields and associated values.
|
AsyncExecutions<KeyScanCursor<K>> |
hscanNovalues(K key)
Incrementally iterate hash fields, without associated values.
|
AsyncExecutions<StreamScanCursor> |
hscanNovalues(KeyStreamingChannel<K> channel,
K key)
Incrementally iterate hash fields, without associated values.
|
AsyncExecutions<StreamScanCursor> |
hscanNovalues(KeyStreamingChannel<K> channel,
K key,
ScanArgs scanArgs)
Incrementally iterate hash fields, without associated values.
|
AsyncExecutions<StreamScanCursor> |
hscanNovalues(KeyStreamingChannel<K> channel,
K key,
ScanCursor scanCursor)
Incrementally iterate hash fields, without associated values.
|
AsyncExecutions<StreamScanCursor> |
hscanNovalues(KeyStreamingChannel<K> channel,
K key,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate hash fields, without associated values.
|
AsyncExecutions<KeyScanCursor<K>> |
hscanNovalues(K key,
ScanArgs scanArgs)
Incrementally iterate hash fields, without associated values.
|
AsyncExecutions<KeyScanCursor<K>> |
hscanNovalues(K key,
ScanCursor scanCursor)
Incrementally iterate hash fields, without associated values.
|
AsyncExecutions<KeyScanCursor<K>> |
hscanNovalues(K key,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate hash fields, without associated values.
|
AsyncExecutions<Boolean> |
hset(K key,
K field,
V value)
Set the string value of a hash field.
|
AsyncExecutions<Long> |
hset(K key,
Map<K,V> map)
Set multiple hash fields to multiple values.
|
AsyncExecutions<Long> |
hsetex(K key,
HSetExArgs hSetExArgs,
Map<K,V> map)
Set the value of one or more fields of a given hash key, and optionally set their expiration
|
AsyncExecutions<Long> |
hsetex(K key,
Map<K,V> map)
Set the value of one or more fields of a given hash key, and optionally set their expiration
|
AsyncExecutions<Boolean> |
hsetnx(K key,
K field,
V value)
Set the value of a hash field, only if the field does not exist.
|
AsyncExecutions<Long> |
hstrlen(K key,
K field)
Get the string length of the field value in a hash.
|
AsyncExecutions<List<Long>> |
httl(K key,
K... fields)
Get the time to live for one or more fields.
|
AsyncExecutions<List<V>> |
hvals(K key)
Get all the values in a hash.
|
AsyncExecutions<Long> |
hvals(ValueStreamingChannel<V> channel,
K key)
Stream over all the values in a hash.
|
AsyncExecutions<Long> hdel(K key, K... fields)
key - the key.fields - the field type: key.AsyncExecutions<Boolean> hexists(K key, K field)
key - the key.field - the field type: key.true if the hash contains field. false if the hash does not contain field, or
key does not exist.AsyncExecutions<V> hget(K key, K field)
key - the key.field - the field type: key.field, or null when field is not present in
the hash or key does not exist.AsyncExecutions<Long> hincrby(K key, K field, long amount)
key - the key.field - the field type: key.amount - the increment type: long.field after the increment operation.AsyncExecutions<Double> hincrbyfloat(K key, K field, double amount)
key - the key.field - the field type: key.amount - the increment type: double.field after the increment.AsyncExecutions<Map<K,V>> hgetall(K key)
key - the key.key
does not exist.AsyncExecutions<Long> hgetall(KeyValueStreamingChannel<K,V> channel, K key)
channel - the channel.key - the key.AsyncExecutions<List<K>> hkeys(K key)
key - the key.key does not exist.AsyncExecutions<Long> hkeys(KeyStreamingChannel<K> channel, K key)
channel - the channel.key - the key.AsyncExecutions<Long> hlen(K key)
key - the key.0 when key does not exist.AsyncExecutions<List<KeyValue<K,V>>> hmget(K key, K... fields)
key - the key.fields - the field type: key.AsyncExecutions<Long> hmget(KeyValueStreamingChannel<K,V> channel, K key, K... fields)
channel - the channel.key - the key.fields - the fields.@Deprecated AsyncExecutions<String> hmset(K key, Map<K,V> map)
hset(java.lang.Object, java.util.Map) instead. This command is deprecated by Redis
since version 4.0.0.key - the key.map - the hash to apply.AsyncExecutions<K> hrandfield(K key)
key.key - the key.AsyncExecutions<List<K>> hrandfield(K key, long count)
count random fields from the hash stored at key.key - the key.count - the number of fields to return. If the provided count argument is positive, return an array of distinct
fields.AsyncExecutions<KeyValue<K,V>> hrandfieldWithvalues(K key)
key.key - the key.AsyncExecutions<List<KeyValue<K,V>>> hrandfieldWithvalues(K key, long count)
count random fields along their value from the hash stored at key.key - the key.count - the number of fields to return. If the provided count argument is positive, return an array of distinct
fields.AsyncExecutions<MapScanCursor<K,V>> hscan(K key)
key - the key.AsyncExecutions<KeyScanCursor<K>> hscanNovalues(K key)
key - the key.AsyncExecutions<MapScanCursor<K,V>> hscan(K key, ScanArgs scanArgs)
key - the key.scanArgs - scan arguments.AsyncExecutions<KeyScanCursor<K>> hscanNovalues(K key, ScanArgs scanArgs)
key - the key.scanArgs - scan arguments.AsyncExecutions<MapScanCursor<K,V>> hscan(K key, ScanCursor scanCursor, ScanArgs scanArgs)
key - the key.scanCursor - cursor to resume from a previous scan, must not be null.scanArgs - scan arguments.AsyncExecutions<KeyScanCursor<K>> hscanNovalues(K key, ScanCursor scanCursor, ScanArgs scanArgs)
key - the key.scanCursor - cursor to resume from a previous scan, must not be null.scanArgs - scan arguments.AsyncExecutions<MapScanCursor<K,V>> hscan(K key, ScanCursor scanCursor)
key - the key.scanCursor - cursor to resume from a previous scan, must not be null.AsyncExecutions<KeyScanCursor<K>> hscanNovalues(K key, ScanCursor scanCursor)
key - the key.scanCursor - cursor to resume from a previous scan, must not be null.AsyncExecutions<StreamScanCursor> hscan(KeyValueStreamingChannel<K,V> channel, K key)
channel - streaming channel that receives a call for every key-value pair.key - the key.AsyncExecutions<StreamScanCursor> hscanNovalues(KeyStreamingChannel<K> channel, K key)
channel - streaming channel that receives a call for every key.key - the key.AsyncExecutions<StreamScanCursor> hscan(KeyValueStreamingChannel<K,V> channel, K key, ScanArgs scanArgs)
channel - streaming channel that receives a call for every key-value pair.key - the key.scanArgs - scan arguments.AsyncExecutions<StreamScanCursor> hscanNovalues(KeyStreamingChannel<K> channel, K key, ScanArgs scanArgs)
channel - streaming channel that receives a call for every key.key - the key.scanArgs - scan arguments.AsyncExecutions<StreamScanCursor> hscan(KeyValueStreamingChannel<K,V> channel, K key, ScanCursor scanCursor, ScanArgs scanArgs)
channel - streaming channel that receives a call for every key-value pair.key - the key.scanCursor - cursor to resume from a previous scan, must not be null.scanArgs - scan arguments.AsyncExecutions<StreamScanCursor> hscanNovalues(KeyStreamingChannel<K> channel, K key, ScanCursor scanCursor, ScanArgs scanArgs)
channel - streaming channel that receives a call for every key.key - the key.scanCursor - cursor to resume from a previous scan, must not be null.scanArgs - scan arguments.AsyncExecutions<StreamScanCursor> hscan(KeyValueStreamingChannel<K,V> channel, K key, ScanCursor scanCursor)
channel - streaming channel that receives a call for every key-value pair.key - the key.scanCursor - cursor to resume from a previous scan, must not be null.AsyncExecutions<StreamScanCursor> hscanNovalues(KeyStreamingChannel<K> channel, K key, ScanCursor scanCursor)
channel - streaming channel that receives a call for every key.key - the key.scanCursor - cursor to resume from a previous scan, must not be null.AsyncExecutions<Boolean> hset(K key, K field, V value)
key - the key.field - the field type: key.value - the value.true if field is a new field in the hash and value was set. false if
field already exists in the hash and the value was updated.AsyncExecutions<Long> hset(K key, Map<K,V> map)
key - the key of the hash.map - the field/value pairs to update.AsyncExecutions<Long> hsetex(K key, Map<K,V> map)
key - the key of the hash.map - the field/value pairs to update.AsyncExecutions<Long> hsetex(K key, HSetExArgs hSetExArgs, Map<K,V> map)
key - the key of the hash.hSetExArgs - hsetex arguments.map - the field/value pairs to update.AsyncExecutions<List<KeyValue<K,V>>> hgetex(K key, K... fields)
key - the key of the hash.fields - fields to retrieve.AsyncExecutions<List<KeyValue<K,V>>> hgetex(K key, HGetExArgs hGetExArgs, K... fields)
key - the key of the hash.hGetExArgs - hgetex arguments.fields - fields to retrieve.AsyncExecutions<Long> hgetex(KeyValueStreamingChannel<K,V> channel, K key, HGetExArgs hGetExArgs, K... fields)
channel - the channel.key - the key.hGetExArgs - hgetex arguments.fields - fields to retrieve.AsyncExecutions<List<KeyValue<K,V>>> hgetdel(K key, K... fields)
key - the hash key.fields - fields to retrieve and delete.AsyncExecutions<Long> hgetdel(KeyValueStreamingChannel<K,V> channel, K key, K... fields)
channel - the channel.key - the key.fields - fields to retrieve and delete.AsyncExecutions<Boolean> hsetnx(K key, K field, V value)
key - the key.field - the field type: key.value - the value.1 if field is a new field in the hash and value was set. 0 if field
already exists in the hash and no operation was performed.AsyncExecutions<Long> hstrlen(K key, K field)
key - the key.field - the field type: key.field value, or 0 when field is not present
in the hash or key does not exist at all.AsyncExecutions<List<V>> hvals(K key)
key - the key.key does not exist.AsyncExecutions<Long> hvals(ValueStreamingChannel<V> channel, K key)
channel - streaming channel that receives a call for every value.key - the key.AsyncExecutions<List<Long>> hexpire(K key, long seconds, K... fields)
key - the key of the fields.seconds - the seconds type: long.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is 0; 1 indicating expiration time is set/updated;
0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not met);
-2 indicating there is no such fieldAsyncExecutions<List<Long>> hexpire(K key, long seconds, ExpireArgs expireArgs, K... fields)
key - the key of the fields.seconds - the seconds type: long.expireArgs - the expiry arguments.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is 0; 1 indicating expiration time is set/updated;
0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not met);
-2 indicating there is no such fieldAsyncExecutions<List<Long>> hexpire(K key, Duration seconds, K... fields)
key - the key.seconds - the TTL Durationfields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is 0; 1 indicating expiration time is set/updated;
0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not met);
-2 indicating there is no such fieldAsyncExecutions<List<Long>> hexpire(K key, Duration seconds, ExpireArgs expireArgs, K... fields)
key - the key.seconds - the TTL DurationexpireArgs - the ExpireArgs.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is 0; 1 indicating expiration time is set/updated;
0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not met);
-2 indicating there is no such fieldAsyncExecutions<List<Long>> hexpireat(K key, long timestamp, K... fields)
key - the key.timestamp - the timestamp type: posix time.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is in the past; 1 indicating expiration time is
set/updated; 0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not
met); -2 indicating there is no such fieldAsyncExecutions<List<Long>> hexpireat(K key, long timestamp, ExpireArgs expireArgs, K... fields)
key - the key.timestamp - the timestamp type: posix time.expireArgs - the expiry arguments.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is in the past; 1 indicating expiration time is
set/updated; 0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not
met); -2 indicating there is no such fieldAsyncExecutions<List<Long>> hexpireat(K key, Date timestamp, K... fields)
key - the key.timestamp - the timestamp type: posix time.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is in the past; 1 indicating expiration time is
set/updated; 0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not
met); -2 indicating there is no such fieldAsyncExecutions<List<Long>> hexpireat(K key, Date timestamp, ExpireArgs expireArgs, K... fields)
key - the key.timestamp - the timestamp type: posix time.expireArgs - the expiry arguments.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is in the past; 1 indicating expiration time is
set/updated; 0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not
met); -2 indicating there is no such fieldAsyncExecutions<List<Long>> hexpireat(K key, Instant timestamp, K... fields)
key - the key.timestamp - the timestamp type: posix time.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is in the past; 1 indicating expiration time is
set/updated; 0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not
met); -2 indicating there is no such fieldAsyncExecutions<List<Long>> hexpireat(K key, Instant timestamp, ExpireArgs expireArgs, K... fields)
key - the key.timestamp - the timestamp type: posix time.expireArgs - the expiry arguments.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is in the past; 1 indicating expiration time is
set/updated; 0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not
met); -2 indicating there is no such fieldAsyncExecutions<List<Long>> hexpiretime(K key, K... fields)
key - the key.fields - one or more fields to get the TTL for.Long values for each of the fields provided: expiration time as a UNIX timestamp in seconds;
-1 indicating the field has no expiry time set; -2 indicating there is no such fieldAsyncExecutions<List<Long>> hpersist(K key, K... fields)
key - the key.fields - one or more fields to remove the TTL for.Long values for each of the fields provided: 1 indicating expiration time is removed;
-1 field has no expiration time to be removed; -2 indicating there is no such fieldAsyncExecutions<List<Long>> hpexpire(K key, long milliseconds, K... fields)
key - the key.milliseconds - the milliseconds type: long.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is 0; 1 indicating expiration time is set/updated;
0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not met);
-2 indicating there is no such fieldAsyncExecutions<List<Long>> hpexpire(K key, long milliseconds, ExpireArgs expireArgs, K... fields)
key - the key.milliseconds - the milliseconds type: long.expireArgs - the expiry arguments.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is 0; 1 indicating expiration time is set/updated;
0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not met);
-2 indicating there is no such fieldAsyncExecutions<List<Long>> hpexpire(K key, Duration milliseconds, K... fields)
key - the key.milliseconds - the milliseconds.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is 0; 1 indicating expiration time is set/updated;
0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not met);
-2 indicating there is no such fieldAsyncExecutions<List<Long>> hpexpire(K key, Duration milliseconds, ExpireArgs expireArgs, K... fields)
key - the key.milliseconds - the milliseconds.expireArgs - the expiry arguments.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is 0; 1 indicating expiration time is set/updated;
0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not met);
-2 indicating there is no such fieldAsyncExecutions<List<Long>> hpexpireat(K key, long timestamp, K... fields)
key - the key.timestamp - the milliseconds-timestamp type: posix time.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is in the past; 1 indicating expiration time is
set/updated; 0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not
met); -2 indicating there is no such fieldAsyncExecutions<List<Long>> hpexpireat(K key, long timestamp, ExpireArgs expireArgs, K... fields)
key - the key.timestamp - the milliseconds-timestamp type: posix time.expireArgs - the expiry arguments.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is in the past; 1 indicating expiration time is
set/updated; 0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not
met); -2 indicating there is no such fieldAsyncExecutions<List<Long>> hpexpireat(K key, Date timestamp, K... fields)
key - the key.timestamp - the milliseconds-timestamp type: posix time.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is in the past; 1 indicating expiration time is
set/updated; 0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not
met); -2 indicating there is no such fieldAsyncExecutions<List<Long>> hpexpireat(K key, Date timestamp, ExpireArgs expireArgs, K... fields)
key - the key.timestamp - the milliseconds-timestamp type: posix time.expireArgs - the expiry arguments.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is in the past; 1 indicating expiration time is
set/updated; 0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not
met); -2 indicating there is no such fieldAsyncExecutions<List<Long>> hpexpireat(K key, Instant timestamp, K... fields)
key - the key.timestamp - the milliseconds-timestamp type: posix time.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is in the past; 1 indicating expiration time is
set/updated; 0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not
met); -2 indicating there is no such fieldAsyncExecutions<List<Long>> hpexpireat(K key, Instant timestamp, ExpireArgs expireArgs, K... fields)
key - the key.timestamp - the milliseconds-timestamp type: posix time.expireArgs - the expiry arguments.fields - one or more fields to set the TTL for.Long values for each of the fields provided: 2 indicating the specific field is deleted
already due to expiration, or provided expiry interval is in the past; 1 indicating expiration time is
set/updated; 0 indicating the expiration time is not set (a provided NX | XX | GT | LT condition is not
met); -2 indicating there is no such fieldAsyncExecutions<List<Long>> hpexpiretime(K key, K... fields)
key - the key.fields - one or more fields to get the TTL for.Long values for each of the fields provided: expiration time as a UNIX timestamp in
milliseconds; -1 indicating the field has no expiry time set; -2 indicating there is no such
fieldAsyncExecutions<List<Long>> httl(K key, K... fields)
key - the key.fields - one or more fields to get the TTL for.Long values for each of the fields provided: the time to live in seconds; or a negative value
in order to signal an error. The command returns -1 if the key exists but has no associated expiration
time. The command returns -2 if the key does not exist.AsyncExecutions<List<Long>> hpttl(K key, K... fields)
key - the key.fields - one or more fields to get the TTL for.Long values for each of the fields provided: the time to live in milliseconds; or a negative
value in order to signal an error. The command returns -1 if the key exists but has no associated
expiration time. The command returns -2 if the key does not exist.@Experimental AsyncExecutions<String> himportSet(K key, HashImport<K> fieldset, V... values)
key from fieldset, sending only the values, positionally paired to the
fieldset's field names. The created key is an ordinary hash.
The field names are declared to the server once per connection on first use, and re-declared transparently across
reconnects, pooled connections, and new cluster nodes, so each import carries values only. Close the fieldset when the import is finished to release its server-side state.
Not supported inside a MULTI transaction.
key - the key of the hash to create, must not be null.fieldset - the field names to import into, must not be null and must not be closed.values - the values in fieldset order, must not be null and must contain exactly HashImport.size()
elements.OK.IllegalArgumentException - if key, fieldset, or values is null, or if the number of
values does not match HashImport.size().IllegalStateException - if fieldset has been closed.UnsupportedOperationException - if invoked within a MULTI transaction.Copyright © 2026 lettuce.io. All rights reserved.