@Override public String getApiName() { return apiName.asName(); }
@Override public String getLongName() { return apiName.asName(); }
@Override public String getApiName() { return apiName.asName(); }
@Override public String getLongName() { return apiName.asName(); }
/** * Constructor. * * @param apiName API Name of the dimension * @param physicalName Physical name of the dimension * @param keyValueStore KeyValueStore for the dimension * @param searchProvider SearchProvider for the dimension * @param fields Fields of the dimension * @param defaultFields Default fields of the dimension * @param storageStrategy Storage Strategy of the dimension */ public TestDimensionConfig( TestApiDimensionName apiName, String physicalName, KeyValueStore keyValueStore, SearchProvider searchProvider, LinkedHashSet<DimensionField> fields, LinkedHashSet<DimensionField> defaultFields, StorageStrategy storageStrategy ) { this.apiName = apiName; this.physicalName = physicalName; this.description = apiName.asName(); this.keyValueStore = keyValueStore; this.searchProvider = searchProvider; this.fields = fields; this.defaultFields = defaultFields; this.storageStrategy = storageStrategy; }
/** * Constructor. * * @param apiName API Name of the dimension * @param physicalName Physical name of the dimension * @param keyValueStore KeyValueStore for the dimension * @param searchProvider SearchProvider for the dimension * @param fields Fields of the dimension * @param defaultFields Default fields of the dimension */ public TestDimensionConfig( TestApiDimensionName apiName, String physicalName, KeyValueStore keyValueStore, SearchProvider searchProvider, LinkedHashSet<DimensionField> fields, LinkedHashSet<DimensionField> defaultFields ) { this.apiName = apiName; this.physicalName = physicalName; this.description = apiName.asName(); this.keyValueStore = keyValueStore; this.searchProvider = searchProvider; this.fields = fields; this.defaultFields = defaultFields; this.storageStrategy = StorageStrategy.LOADED; }
/** * Constructor. * * @param apiName API Name of the dimension * @param physicalName Physical name of the dimension * @param keyValueStore KeyValueStore for the dimension * @param searchProvider SearchProvider for the dimension * @param fields Fields of the dimension * @param defaultFields Default fields of the dimension * @param storageStrategy Storage Strategy of the dimension */ public TestDimensionConfig( TestApiDimensionName apiName, String physicalName, KeyValueStore keyValueStore, SearchProvider searchProvider, LinkedHashSet<DimensionField> fields, LinkedHashSet<DimensionField> defaultFields, StorageStrategy storageStrategy ) { this.apiName = apiName; this.physicalName = physicalName; this.description = apiName.asName(); this.keyValueStore = keyValueStore; this.searchProvider = searchProvider; this.fields = fields; this.defaultFields = defaultFields; this.storageStrategy = storageStrategy; }
/** * Constructor. * * @param apiName API Name of the dimension * @param physicalName Physical name of the dimension * @param keyValueStore KeyValueStore for the dimension * @param searchProvider SearchProvider for the dimension * @param fields Fields of the dimension * @param defaultFields Default fields of the dimension */ public TestDimensionConfig( TestApiDimensionName apiName, String physicalName, KeyValueStore keyValueStore, SearchProvider searchProvider, LinkedHashSet<DimensionField> fields, LinkedHashSet<DimensionField> defaultFields ) { this.apiName = apiName; this.physicalName = physicalName; this.description = apiName.asName(); this.keyValueStore = keyValueStore; this.searchProvider = searchProvider; this.fields = fields; this.defaultFields = defaultFields; this.storageStrategy = StorageStrategy.LOADED; }
/** * 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()); } }
/** * Build a standard-config Lucene-backed dimension config. * * @param dimensionName Name of the dimension to build * * @return the standard lucene-backed dimension config */ public static TestDimensionConfig buildStandardLuceneDimensionConfig(TestApiDimensionName dimensionName) { return new TestDimensionConfig( dimensionName, dimensionName.asName(), getDefaultKeyValueStore(dimensionName), LuceneSearchProviderManager.getInstance(dimensionName.asName()), getDefaultFields(), getDefaultFields() ); }
/** * Build a standard-config Lucene-backed dimension config. * * @param dimensionName Name of the dimension to build * * @return the standard lucene-backed dimension config */ public static TestDimensionConfig buildStandardLuceneDimensionConfig(TestApiDimensionName dimensionName) { return new TestDimensionConfig( dimensionName, dimensionName.asName(), getDefaultKeyValueStore(dimensionName), LuceneSearchProviderManager.getInstance(dimensionName.asName()), getDefaultFields(), getDefaultFields() ); }
"misc", getDefaultKeyValueStore(OTHER), NoOpSearchProviderManager.getInstance(OTHER.asName()), getDefaultFields(), getDefaultFields()
"misc", getDefaultKeyValueStore(OTHER), NoOpSearchProviderManager.getInstance(OTHER.asName()), getDefaultFields(), getDefaultFields()
/** * Build a standard-config dimension config. * * @param dimensionName Name of the dimension to build * * @return the standard dimension config */ protected static TestDimensionConfig buildStandardDimensionConfig(TestApiDimensionName dimensionName) { return new TestDimensionConfig( dimensionName, dimensionName.asName(), getDefaultKeyValueStore(dimensionName), getDefaultSearchProvider(), getDefaultFields(), getDefaultFields() ); }
/** * Build a non-loaded dimension config. * * @param dimensionName Name of the dimension to build * * @return the standard dimension config */ protected static TestDimensionConfig buildNonLoadedDimensionConfig(TestApiDimensionName dimensionName) { return new TestDimensionConfig( dimensionName, dimensionName.asName(), getDefaultKeyValueStore(dimensionName), getDefaultSearchProvider(), getDefaultFields(), getDefaultFields(), StorageStrategy.NONE ); }
/** * Build a non-loaded dimension config. * * @param dimensionName Name of the dimension to build * * @return the standard dimension config */ protected static TestDimensionConfig buildNonLoadedDimensionConfig(TestApiDimensionName dimensionName) { return new TestDimensionConfig( dimensionName, dimensionName.asName(), getDefaultKeyValueStore(dimensionName), getDefaultSearchProvider(), getDefaultFields(), getDefaultFields(), StorageStrategy.NONE ); }
/** * Build a standard-config dimension config. * * @param dimensionName Name of the dimension to build * * @return the standard dimension config */ protected static TestDimensionConfig buildStandardDimensionConfig(TestApiDimensionName dimensionName) { return new TestDimensionConfig( dimensionName, dimensionName.asName(), getDefaultKeyValueStore(dimensionName), getDefaultSearchProvider(), getDefaultFields(), getDefaultFields() ); }