public abstract class AbstractWrapperStoreProvider extends java.lang.Object implements WrapperStore.Provider
Constructor and Description |
---|
AbstractWrapperStoreProvider() |
Modifier and Type | Method and Description |
---|---|
<K,V> Store<K,V> |
createStore(Store.Configuration<K,V> storeConfig,
ServiceConfiguration<?,?>... serviceConfigs)
Creates a new Store instance
|
void |
initStore(Store<?,?> resource)
Informs this Provider, a Store it created is being initialized
|
void |
releaseStore(Store<?,?> resource)
Informs this Provider, a Store it created is being disposed (i.e.
|
void |
start(ServiceProvider<Service> serviceProvider)
Start this service using the provided configuration and
ServiceProvider . |
void |
stop()
Stops this service.
|
protected abstract <K,V> Store<K,V> |
wrap(Store<K,V> store,
Store.Configuration<K,V> storeConfig,
ServiceConfiguration<?,?>... serviceConfigs) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
wrapperStoreRank
rank
public <K,V> Store<K,V> createStore(Store.Configuration<K,V> storeConfig, ServiceConfiguration<?,?>... serviceConfigs)
Store.Provider
createStore
in interface Store.Provider
storeConfig
- the basic configuration for the StoreserviceConfigs
- the configurations the Provider may need to configure the Storeprotected abstract <K,V> Store<K,V> wrap(Store<K,V> store, Store.Configuration<K,V> storeConfig, ServiceConfiguration<?,?>... serviceConfigs)
public void releaseStore(Store<?,?> resource)
Store.Provider
releaseStore
in interface Store.Provider
resource
- the store to releasepublic void initStore(Store<?,?> resource)
Store.Provider
initStore
in interface Store.Provider
resource
- the store to initializepublic void start(ServiceProvider<Service> serviceProvider)
Service
ServiceProvider
.
The service provider allows a service to retrieve and use other services.
A Service
retrieved at this stage may not yet be started. The recommended usage pattern therefore, is to keep a
reference to the dependent Service
but use it only when specific methods are invoked on subtypes.