/** * Factory for singleton instances by name. * <p> * Only a single instance can exist for each name. * * @param storeName Name for the singleton instance * * @return The singleton instance for the given name */ public static synchronized RedisStore getInstance(String storeName) { RedisStore redisStore = REDIS_STORES.get(storeName); if (redisStore == null) { redisStore = new RedisStore(storeName, POOL, REDIS_NAMESPACE); REDIS_STORES.put(storeName, redisStore); } return redisStore; }