/** * Get the default KeyValueStore for the given store name. * * @param storeName The store name for which to get the default key value store * * @return the default KeyValueStore */ public static KeyValueStore getDefaultKeyValueStore(TestApiDimensionName storeName) { switch (DimensionBackend.getBackend()) { case REDIS: RedisStore store = RedisStoreManager.getInstance(storeName.asName()); // Key/values stored in Redis persist between tests, so remove // them to give the test a clean environment. store.removeAllKeys(); return store; case MEMORY: default: return MapStoreManager.getInstance(storeName.asName()); } }
/** * Get the default KeyValueStore for the given store name. * * @param storeName The store name for which to get the default key value store * * @return the default KeyValueStore */ public static KeyValueStore getDefaultKeyValueStore(TestApiDimensionName storeName) { switch (DimensionBackend.getBackend()) { case REDIS: RedisStore store = RedisStoreManager.getInstance(storeName.asName()); // Key/values stored in Redis persist between tests, so remove // them to give the test a clean environment. store.removeAllKeys(); return store; case MEMORY: default: return MapStoreManager.getInstance(storeName.asName()); } }