public class StoreServiceLoader extends Object
StoreServices.StoreService| Constructor and Description |
|---|
StoreServiceLoader()
Creates a reusable instance of the provider, service discovery occurs at this point!
|
StoreServiceLoader(Map<Class<? extends StoreService>,Integer> priorityOverrides)
Creates a reusable instance of the provider, service discovery occurs at this point!
|
| Modifier and Type | Method and Description |
|---|---|
StoreService |
getStoreService()
Gets the
StoreService implementation to use. |
<K extends Comparable<K>,V> |
newGenericStore(Class<K> keyClass,
Class<V> valueClass)
Generates a new generic store instance from the most appropriate service.
|
<V> LongObjStore<V> |
newLongObjStore(Class<V> valueClass)
Generates a new long-object store instance from the most appropriate service.
|
public StoreServiceLoader()
public StoreServiceLoader(Map<Class<? extends StoreService>,Integer> priorityOverrides)
priorityOverrides - Allows for manual overriding of StoreService.order().public StoreService getStoreService()
StoreService implementation to use.StoreService implementation.public <K extends Comparable<K>,V> Store<K,V> newGenericStore(Class<K> keyClass, Class<V> valueClass)
K - The key type which provides a 1:1 mapping to the value type. This type is also expected to be
Comparable in order to allow for range operations.V - The value type.keyClass - The class of the keys.valueClass - The class of the values.public <V> LongObjStore<V> newLongObjStore(Class<V> valueClass)
V - The value type.valueClass - The class of the values.