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. |
List<byte[]> |
hVals(byte[] key)
Get entry set (values) of hash at
field . |
Boolean hSet(byte[] key, byte[] field, byte[] value)
value
of a hash field
.key
- field
- value
- http://redis.io/commands/hset
Boolean hSetNX(byte[] key, byte[] field, byte[] value)
value
of a hash field
only if field
does not exist.key
- field
- value
- http://redis.io/commands/hsetnx
byte[] hGet(byte[] key, byte[] field)
field
from hash at key
.key
- field
- http://redis.io/commands/hget
List<byte[]> hMGet(byte[] key, byte[]... fields)
fields
from hash at key
.key
- fields
- http://redis.io/commands/hmget
void hMSet(byte[] key, Map<byte[],byte[]> hashes)
hashes
key
- hashes
- http://redis.io/commands/hmset
Long hIncrBy(byte[] key, byte[] field, long delta)
value
of a hash field
by the given delta
.key
- field
- delta
- http://redis.io/commands/hincrby
Double hIncrBy(byte[] key, byte[] field, double delta)
value
of a hash field
by the given delta
.key
- field
- delta
- http://redis.io/commands/hincrbyfloat
Boolean hExists(byte[] key, byte[] field)
field
exists.key
- field
- http://redis.io/commands/hexits
Long hDel(byte[] key, byte[]... fields)
fields
.key
- fields
- http://redis.io/commands/hdel
Long hLen(byte[] key)
key
.key
- http://redis.io/commands/hlen
Set<byte[]> hKeys(byte[] key)
key
.key
- http://redis.io/commands/h?
List<byte[]> hVals(byte[] key)
field
.key
- http://redis.io/commands/hvals
Map<byte[],byte[]> hGetAll(byte[] key)
key
.key
- http://redis.io/commands/hgetall
Cursor<Map.Entry<byte[],byte[]>> hScan(byte[] key, ScanOptions options)
Cursor
to iterate over entries in hash at key
.key
- options
- http://redis.io/commands/scan
Copyright © 2011-2016–2016 Pivotal Software, Inc.. All rights reserved.