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 theTransientStoreServiceand managing the underlying extension point- Since:
- 7.2
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_STORE_NAMEstatic StringEP_STOREprotected 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 voidcleanUpStores()voiddeactivate(ComponentContext context)Deactivates the component.voiddoGC()Triggers Garbage collecting of allTransientStorevoiddoGC(String name)Triggers Garbage collecting for aTransientStore.protected TransientStoreConfiggetDefaultDescriptor()TransientStoregetStore(String name)Retrieves aTransientStoreby it's name.Set<String>listStores()List contributed transient storage namesvoidstart(ComponentContext context)Start the component.voidstop(ComponentContext context)Stop the component.protected booleanunregister(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:TransientStoreServiceRetrieves aTransientStoreby it's name.If the
TransientStoreis not found, returns the default one.- Specified by:
getStorein interfaceTransientStoreService- Parameters:
name- the name of the targetTransientStore- Returns:
- the target
TransientStoreor the default one if not found
-
getDefaultDescriptor
protected TransientStoreConfig getDefaultDescriptor()
-
doGC
public void doGC()
Description copied from interface:TransientStoreServiceTriggers Garbage collecting of allTransientStore- Specified by:
doGCin interfaceTransientStoreService
-
doGC
public void doGC(String name)
Description copied from interface:TransientStoreServiceTriggers Garbage collecting for aTransientStore.- Specified by:
doGCin interfaceTransientStoreService- Parameters:
name- the name of the targetTransientStore
-
listStores
public Set<String> listStores()
Description copied from interface:TransientStoreServiceList contributed transient storage names- Specified by:
listStoresin interfaceTransientStoreService
-
unregister
protected boolean unregister(String xp, Descriptor descriptor)
- Overrides:
unregisterin classDefaultComponent
-
start
public void start(ComponentContext context)
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
startin interfaceComponent- Overrides:
startin classDefaultComponent
-
stop
public void stop(ComponentContext context) throws InterruptedException
Description copied from interface:ComponentStop the component.- Specified by:
stopin interfaceComponent- Overrides:
stopin classDefaultComponent- Throws:
InterruptedException
-
deactivate
public void deactivate(ComponentContext context)
Description copied from interface:ComponentDeactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivatein interfaceComponent- Overrides:
deactivatein classDefaultComponent- Parameters:
context- the runtime context
-
cleanUpStores
public void cleanUpStores()
-
-