Package com.illumon.iris.binarystore
Class StringCacheProviders
java.lang.Object
com.illumon.iris.binarystore.StringCacheProviders
StringCacheProvider implementations to provide a framework for data ingestion.-
Method Summary
Modifier and TypeMethodDescriptionstatic StringCacheProvidergetAlwaysCreateStringInstance(boolean unbounded) Get an instance that returns a cache that acts more as a factory, and does no caching internally.static StringCacheProvidergetDefaultCacheProvider(com.fishlib.configuration.Configuration configuration) Get a "default" cache provider according to a single capacity property.static StringCacheProvidermakeHintDrivenCacheProvider(Map<String, String> propertyDictionary, com.fishlib.configuration.Configuration configuration, String hintDrivenStringCachePrefix) Make a "hint-driven" cache provider according to a list of hint to specifier mappings from a configuration.
-
Method Details
-
getAlwaysCreateStringInstance
Get an instance that returns a cache that acts more as a factory, and does no caching internally.- Parameters:
unbounded- Whether the cache should be unbounded (triggering strict symbol management) or bounded- Returns:
- The provider instance
-
getDefaultCacheProvider
public static StringCacheProvider getDefaultCacheProvider(@NotNull com.fishlib.configuration.Configuration configuration) Get a "default" cache provider according to a single capacity property. Determines the default provider fromconfigurationif this hasn't been done already.- Parameters:
configuration- The configuration to fetch the capacity property from- Returns:
- A new StringCacheProviders supplying a cache that makes sense for the configured capacity
-
makeHintDrivenCacheProvider
public static StringCacheProvider makeHintDrivenCacheProvider(@NotNull Map<String, String> propertyDictionary, @NotNull com.fishlib.configuration.Configuration configuration, @NotNull String hintDrivenStringCachePrefix) Make a "hint-driven" cache provider according to a list of hint to specifier mappings from a configuration.- Parameters:
propertyDictionary- A dictionary of properties that should be prioritized overconfigurationproperties, e.g. derived from a DataImportServer's data routing entryconfiguration- The configuration to fetch hint to specifier properties fromhintDrivenStringCachePrefix- The prefix to use when finding properties- Returns:
- A new StringCacheProviders encompassing the configured hints
-