public class RedisStoreManager extends Object
Though not needed, the singleton pattern is used to namespace keys. Each instance has a name; Given a name, only one instance with that name exists.
Modifier and Type | Field and Description |
---|---|
protected static redis.clients.jedis.JedisPool |
POOL |
Constructor and Description |
---|
RedisStoreManager() |
Modifier and Type | Method and Description |
---|---|
static RedisStore |
getInstance(String storeName)
Factory for singleton instances by name.
|
static void |
removeInstance(String storeName)
Delete the named singleton instance.
|
public static RedisStore getInstance(String storeName)
Only a single instance can exist for each name.
storeName
- Name for the singleton instancepublic static void removeInstance(String storeName)
Also deletes all keys created by the instance.
storeName
- Name of the singleton instance to deleteCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.