Package com.illumon.iris.binarystore
Class StringCacheProviders
java.lang.Object
com.illumon.iris.binarystore.StringCacheProviders
public abstract class StringCacheProviders extends Object
StringCacheProvider
implementations to provide a framework for data ingestion.-
Method Summary
Modifier and Type Method Description static StringCacheProvider
getAlwaysCreateStringInstance(boolean unbounded)
Get an instance that returns a cache that acts more as a factory, and does no caching internally.static StringCacheProvider
getDefaultCacheProvider(com.fishlib.configuration.Configuration configuration)
Get a "default" cache provider according to a single capacity property.static StringCacheProvider
makeHintDrivenCacheProvider(Map<Object,Object> 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 fromconfiguration
if 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<Object,Object> 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 overconfiguration
properties, 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
-