public class StoreServiceLoader extends Object
StoreService
s.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 extends Serializable> |
newGenericStore(Class<K> keyClass,
Class<V> valueClass)
Generates a new generic store instance from the most appropriate service.
|
<V extends Serializable> |
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 extends Serializable> 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 extends Serializable> LongObjStore<V> newLongObjStore(Class<V> valueClass)
V
- The value type.valueClass
- The class of the values.