public interface RedisHashCommands
| Modifier and Type | Method and Description |
|---|---|
Long |
hDel(byte[] key,
byte[]... fields)
Delete given hash
fields. |
Boolean |
hExists(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. |
Map<byte[],byte[]> |
hGetAll(byte[] key)
Get entire hash stored at
key. |
Double |
hIncrBy(byte[] key,
byte[] field,
double delta)
Increment
value of a hash field by the given delta. |
Long |
hIncrBy(byte[] key,
byte[] field,
long delta)
Increment
value of a hash field by the given delta. |
Set<byte[]> |
hKeys(byte[] key)
Get key set (fields) of hash at
key. |
Long |
hLen(byte[] key)
Get size of hash at
key. |
List<byte[]> |
hMGet(byte[] key,
byte[]... fields)
Get values for given
fields from hash at key. |
void |
hMSet(byte[] key,
Map<byte[],byte[]> hashes)
Set multiple hash fields to multiple values using data provided in
hashes |
Cursor<Map.Entry<byte[],byte[]>> |
hScan(byte[] key,
ScanOptions options)
Use a
Cursor to iterate over entries in hash at key. |
Boolean |
hSet(byte[] key,
byte[] field,
byte[] value)
Set the
value of a hash field. |
Boolean |
hSetNX(byte[] key,
byte[] field,
byte[] value)
Set the
value of a hash field only if field does not exist. |
Long |
hStrLen(byte[] key,
byte[] field)
Returns the length of the value associated with
field in the hash stored at key. |
List<byte[]> |
hVals(byte[] key)
Get entry set (values) of hash at
field. |
@Nullable Boolean hSet(byte[] key, byte[] field, byte[] value)
value of a hash field.key - must not be null.field - must not be null.value - must not be null.@Nullable Boolean hSetNX(byte[] key, byte[] field, byte[] value)
value of a hash field only if field does not exist.key - must not be null.field - must not be null.value - must not be null.@Nullable byte[] hGet(byte[] key, byte[] field)
field from hash at key.key - must not be null.field - must not be null.@Nullable List<byte[]> hMGet(byte[] key, byte[]... fields)
fields from hash at key.key - must not be null.fields - must not be empty.List if key or fields do not exists. null when used in pipeline / transaction.void hMSet(byte[] key,
Map<byte[],byte[]> hashes)
hasheskey - must not be null.hashes - must not be null.@Nullable Long hIncrBy(byte[] key, byte[] field, long delta)
value of a hash field by the given delta.key - must not be null.field - must not be null.delta - @Nullable Double hIncrBy(byte[] key, byte[] field, double delta)
value of a hash field by the given delta.key - must not be null.field - must not be null.delta - @Nullable Boolean hExists(byte[] key, byte[] field)
field exists.key - must not be null.field - must not be null.@Nullable Long hDel(byte[] key, byte[]... fields)
fields.key - must not be null.fields - must not be empty.@Nullable Long hLen(byte[] key)
key.key - must not be null.@Nullable Set<byte[]> hKeys(byte[] key)
key.key - must not be null.@Nullable List<byte[]> hVals(byte[] key)
field.key - must not be null.List if key does not exist. null when used in pipeline / transaction.@Nullable Map<byte[],byte[]> hGetAll(byte[] key)
key.key - must not be null.Map if key does not exist or null when used in pipeline / transaction.Cursor<Map.Entry<byte[],byte[]>> hScan(byte[] key, ScanOptions options)
Cursor to iterate over entries in hash at key.key - must not be null.options - must not be null.@Nullable Long hStrLen(byte[] key, byte[] field)
field in the hash stored at key. If the key or the
field do not exist, 0 is returned.key - must not be null.field - must not be null.Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.