Package org.nuxeo.runtime.kv
Class KeyValueServiceImpl
- java.lang.Object
-
- org.nuxeo.runtime.model.DefaultComponent
-
- org.nuxeo.runtime.kv.KeyValueServiceImpl
-
- All Implemented Interfaces:
KeyValueService
,Adaptable
,Component
,Extensible
,TimestampedService
public class KeyValueServiceImpl extends DefaultComponent implements KeyValueService
Implementation for the Key/Value Service.- Since:
- 9.1
-
-
Field Summary
Fields Modifier and Type Field Description static int
APPLICATION_STARTED_ORDER
static String
DEFAULT_STORE_ID
protected Map<String,KeyValueStoreProvider>
providers
static String
XP_CONFIG
-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description KeyValueServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getApplicationStartedOrder()
The component notification order forComponent.applicationStarted(org.nuxeo.runtime.model.ComponentContext)
.KeyValueStore
getKeyValueStore(String name)
Gets the Key/Value store with the given name.void
stop(ComponentContext context)
Stop the component.-
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, start, unregister, unregisterContribution, unregisterExtension
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.model.Component
applicationStarted
-
-
-
-
Field Detail
-
XP_CONFIG
public static final String XP_CONFIG
- See Also:
- Constant Field Values
-
DEFAULT_STORE_ID
public static final String DEFAULT_STORE_ID
- See Also:
- Constant Field Values
-
APPLICATION_STARTED_ORDER
public static final int APPLICATION_STARTED_ORDER
- See Also:
- Constant Field Values
-
providers
protected Map<String,KeyValueStoreProvider> providers
-
-
Method Detail
-
getApplicationStartedOrder
public int getApplicationStartedOrder()
Description copied from interface:Component
The component notification order forComponent.applicationStarted(org.nuxeo.runtime.model.ComponentContext)
.Components are notified in increasing order. Order 1000 is the default order for components that don't care. Order 100 is the repository initialization.
- Specified by:
getApplicationStartedOrder
in interfaceComponent
- Returns:
- the order, 1000 by default
-
stop
public void stop(ComponentContext context) throws InterruptedException
Description copied from interface:Component
Stop the component.- Specified by:
stop
in interfaceComponent
- Overrides:
stop
in classDefaultComponent
- Throws:
InterruptedException
-
getKeyValueStore
public KeyValueStore getKeyValueStore(String name)
Description copied from interface:KeyValueService
Gets the Key/Value store with the given name.If the store is not found, the default store is returned.
- Specified by:
getKeyValueStore
in interfaceKeyValueService
- Parameters:
name
- the store name- Returns:
- the store with the given name, or the default store
-
-