public class RedisCountStorage extends Object
Connection To Redis Server
Given a pool of connections to Redis, it manages the counting
| Modifier and Type | Method and Description |
|---|---|
long |
adjustCount(String key,
long count)
Adjusts the count for a specific key.
|
static RedisCountStorage |
create(redis.clients.util.Pool<redis.clients.jedis.Jedis> jedisPool) |
long |
getCount(String key)
Gets the count for the specified key.
|
static String |
getKeyNumInstances(String keyspace,
ConceptId conceptId)
All the valid keys which map to values in the redis cache
|
static String |
getKeyNumShards(String keyspace,
ConceptId conceptId) |
public static RedisCountStorage create(redis.clients.util.Pool<redis.clients.jedis.Jedis> jedisPool)
public long adjustCount(String key, long count)
key - the key of the value to adjustcount - the number to adjust the key bypublic long getCount(String key)
key - the key stored in redispublic static String getKeyNumInstances(String keyspace, ConceptId conceptId)
Copyright © 2017 Grakn Labs Ltd. All rights reserved.