Class TransientStorageComponent
- java.lang.Object
-
- org.nuxeo.runtime.model.DefaultComponent
-
- org.nuxeo.ecm.core.transientstore.TransientStorageComponent
-
- All Implemented Interfaces:
TransientStoreService
,Adaptable
,Component
,Extensible
,TimestampedService
public class TransientStorageComponent extends DefaultComponent implements TransientStoreService
Component exposing theTransientStoreService
and managing the underlying extension point- Since:
- 7.2
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_STORE_NAME
static String
EP_STORE
protected Map<String,TransientStoreProvider>
stores
-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description TransientStorageComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUpStores()
void
deactivate(ComponentContext context)
Deactivates the component.void
doGC()
Triggers Garbage collecting of allTransientStore
void
doGC(String name)
Triggers Garbage collecting for aTransientStore
.protected TransientStoreConfig
getDefaultDescriptor()
TransientStore
getStore(String name)
Retrieves aTransientStore
by it's name.Set<String>
listStores()
List contributed transient storage namesvoid
start(ComponentContext context)
Start the component.void
stop(ComponentContext context)
Stop the component.protected boolean
unregister(String xp, Descriptor descriptor)
-
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, 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, getApplicationStartedOrder
-
-
-
-
Field Detail
-
stores
protected Map<String,TransientStoreProvider> stores
-
EP_STORE
public static final String EP_STORE
- See Also:
- Constant Field Values
-
DEFAULT_STORE_NAME
public static final String DEFAULT_STORE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStore
public TransientStore getStore(String name)
Description copied from interface:TransientStoreService
Retrieves aTransientStore
by it's name.If the
TransientStore
is not found, returns the default one.- Specified by:
getStore
in interfaceTransientStoreService
- Parameters:
name
- the name of the targetTransientStore
- Returns:
- the target
TransientStore
or the default one if not found
-
getDefaultDescriptor
protected TransientStoreConfig getDefaultDescriptor()
-
doGC
public void doGC()
Description copied from interface:TransientStoreService
Triggers Garbage collecting of allTransientStore
- Specified by:
doGC
in interfaceTransientStoreService
-
doGC
public void doGC(String name)
Description copied from interface:TransientStoreService
Triggers Garbage collecting for aTransientStore
.- Specified by:
doGC
in interfaceTransientStoreService
- Parameters:
name
- the name of the targetTransientStore
-
listStores
public Set<String> listStores()
Description copied from interface:TransientStoreService
List contributed transient storage names- Specified by:
listStores
in interfaceTransientStoreService
-
unregister
protected boolean unregister(String xp, Descriptor descriptor)
- Overrides:
unregister
in classDefaultComponent
-
start
public void start(ComponentContext context)
Description copied from interface:Component
Start the component. This method is called after all the components were resolved and activated- Specified by:
start
in interfaceComponent
- Overrides:
start
in classDefaultComponent
-
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
-
deactivate
public void deactivate(ComponentContext context)
Description copied from interface:Component
Deactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivate
in interfaceComponent
- Overrides:
deactivate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
cleanUpStores
public void cleanUpStores()
-
-