K
- Key type.V
- Value type.public interface NodeSelectionHashCommands<K,V>
Modifier and Type | Method and Description |
---|---|
Executions<Long> |
hdel(K key,
K... fields)
Delete one or more hash fields.
|
Executions<Boolean> |
hexists(K key,
K field)
Determine if a hash field exists.
|
Executions<V> |
hget(K key,
K field)
Get the value of a hash field.
|
Executions<Map<K,V>> |
hgetall(K key)
Get all the fields and values in a hash.
|
Executions<Long> |
hgetall(KeyValueStreamingChannel<K,V> channel,
K key)
Stream over all the fields and values in a hash.
|
Executions<Long> |
hincrby(K key,
K field,
long amount)
Increment the integer value of a hash field by the given number.
|
Executions<Double> |
hincrbyfloat(K key,
K field,
double amount)
Increment the float value of a hash field by the given amount.
|
Executions<List<K>> |
hkeys(K key)
Get all the fields in a hash.
|
Executions<Long> |
hkeys(KeyStreamingChannel<K> channel,
K key)
Stream over all the fields in a hash.
|
Executions<Long> |
hlen(K key)
Get the number of fields in a hash.
|
Executions<Long> |
hmget(KeyValueStreamingChannel<K,V> channel,
K key,
K... fields)
Stream over the values of all the given hash fields.
|
Executions<List<KeyValue<K,V>>> |
hmget(K key,
K... fields)
Get the values of all the given hash fields.
|
Executions<String> |
hmset(K key,
Map<K,V> map)
Set multiple hash fields to multiple values.
|
Executions<MapScanCursor<K,V>> |
hscan(K key)
Incrementally iterate hash fields and associated values.
|
Executions<StreamScanCursor> |
hscan(KeyValueStreamingChannel<K,V> channel,
K key)
Incrementally iterate hash fields and associated values.
|
Executions<StreamScanCursor> |
hscan(KeyValueStreamingChannel<K,V> channel,
K key,
ScanArgs scanArgs)
Incrementally iterate hash fields and associated values.
|
Executions<StreamScanCursor> |
hscan(KeyValueStreamingChannel<K,V> channel,
K key,
ScanCursor scanCursor)
Incrementally iterate hash fields and associated values.
|
Executions<StreamScanCursor> |
hscan(KeyValueStreamingChannel<K,V> channel,
K key,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate hash fields and associated values.
|
Executions<MapScanCursor<K,V>> |
hscan(K key,
ScanArgs scanArgs)
Incrementally iterate hash fields and associated values.
|
Executions<MapScanCursor<K,V>> |
hscan(K key,
ScanCursor scanCursor)
Incrementally iterate hash fields and associated values.
|
Executions<MapScanCursor<K,V>> |
hscan(K key,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate hash fields and associated values.
|
Executions<Boolean> |
hset(K key,
K field,
V value)
Set the string value of a hash field.
|
Executions<Boolean> |
hsetnx(K key,
K field,
V value)
Set the value of a hash field, only if the field does not exist.
|
Executions<Long> |
hstrlen(K key,
K field)
Get the string length of the field value in a hash.
|
Executions<List<V>> |
hvals(K key)
Get all the values in a hash.
|
Executions<Long> |
hvals(ValueStreamingChannel<V> channel,
K key)
Stream over all the values in a hash.
|
Executions<Long> hdel(K key, K... fields)
key
- the keyfields
- the field type: keyExecutions<Boolean> hexists(K key, K field)
key
- the keyfield
- the field type: keyfield
. false if the hash does not contain field
,
or key
does not exist.Executions<V> hget(K key, K field)
key
- the keyfield
- the field type: keyfield
, or null when field
is not present
in the hash or key
does not exist.Executions<Long> hincrby(K key, K field, long amount)
key
- the keyfield
- the field type: keyamount
- the increment type: longfield
after the increment operation.Executions<Double> hincrbyfloat(K key, K field, double amount)
key
- the keyfield
- the field type: keyamount
- the increment type: doublefield
after the increment.Executions<Map<K,V>> hgetall(K key)
key
- the keykey
does not exist.Executions<Long> hgetall(KeyValueStreamingChannel<K,V> channel, K key)
channel
- the channelkey
- the keyExecutions<List<K>> hkeys(K key)
key
- the keykey
does not exist.Executions<Long> hkeys(KeyStreamingChannel<K> channel, K key)
channel
- the channelkey
- the keyExecutions<Long> hlen(K key)
key
- the key0
when key
does not exist.Executions<List<KeyValue<K,V>>> hmget(K key, K... fields)
key
- the keyfields
- the field type: keyExecutions<Long> hmget(KeyValueStreamingChannel<K,V> channel, K key, K... fields)
channel
- the channelkey
- the keyfields
- the fieldsExecutions<String> hmset(K key, Map<K,V> map)
key
- the keymap
- the nullExecutions<MapScanCursor<K,V>> hscan(K key)
key
- the keyExecutions<MapScanCursor<K,V>> hscan(K key, ScanArgs scanArgs)
key
- the keyscanArgs
- scan argumentsExecutions<MapScanCursor<K,V>> hscan(K key, ScanCursor scanCursor, ScanArgs scanArgs)
key
- the keyscanCursor
- cursor to resume from a previous scan, must not be nullscanArgs
- scan argumentsExecutions<MapScanCursor<K,V>> hscan(K key, ScanCursor scanCursor)
key
- the keyscanCursor
- cursor to resume from a previous scan, must not be nullExecutions<StreamScanCursor> hscan(KeyValueStreamingChannel<K,V> channel, K key)
channel
- streaming channel that receives a call for every key-value pairkey
- the keyExecutions<StreamScanCursor> hscan(KeyValueStreamingChannel<K,V> channel, K key, ScanArgs scanArgs)
channel
- streaming channel that receives a call for every key-value pairkey
- the keyscanArgs
- scan argumentsExecutions<StreamScanCursor> hscan(KeyValueStreamingChannel<K,V> channel, K key, ScanCursor scanCursor, ScanArgs scanArgs)
channel
- streaming channel that receives a call for every key-value pairkey
- the keyscanCursor
- cursor to resume from a previous scan, must not be nullscanArgs
- scan argumentsExecutions<StreamScanCursor> hscan(KeyValueStreamingChannel<K,V> channel, K key, ScanCursor scanCursor)
channel
- streaming channel that receives a call for every key-value pairkey
- the keyscanCursor
- cursor to resume from a previous scan, must not be nullExecutions<Boolean> hset(K key, K field, V value)
key
- the keyfield
- the field type: keyvalue
- the valuefield
is a new field in the hash and value
was set. false if
field
already exists in the hash and the value was updated.Executions<Boolean> hsetnx(K key, K field, V value)
key
- the keyfield
- the field type: keyvalue
- the value1
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.Executions<Long> hstrlen(K key, K field)
key
- the keyfield
- the field type: keyfield
value, or 0
when field
is not present
in the hash or key
does not exist at all.Executions<List<V>> hvals(K key)
key
- the keykey
does not exist.Executions<Long> hvals(ValueStreamingChannel<V> channel, K key)
channel
- streaming channel that receives a call for every valuekey
- the keyCopyright © 2017 lettuce.io. All rights reserved.