Package org.nuxeo.ecm.core
Class CoreService
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.ecm.core.CoreService
- All Implemented Interfaces:
Adaptable,Component,Extensible,TimestampedService
Service used to register version removal policies.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ComponentContextprotected static final DefaultVersionRemovalPolicyprotected Map<CoreServicePolicyDescriptor, VersionRemovalPolicy> Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(ComponentContext context) Activates the component.longcleanupOrphanVersions(long commitSize) Deprecated.voiddeactivate(ComponentContext context) Deactivates the component.protected longdoCleanupOrphanVersions(CoreSession session, long commitSize) voidSchedule a removal of the orphan versions through BAF.Gets all the orphan version removal filters registered.Gets the last version removal policy registered.voidregisterContribution(Object contrib, String point, ComponentInstance contributor) protected voidprotected voidvoidunregisterContribution(Object contrib, String point, ComponentInstance contributor) protected voidprotected voidMethods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
DEFAULT_VERSION_REMOVAL_POLICY
-
versionRemovalPolicies
-
orphanVersionRemovalFilters
protected Map<CoreServiceOrphanVersionRemovalFilterDescriptor,OrphanVersionRemovalFilter> orphanVersionRemovalFilters -
context
-
-
Constructor Details
-
CoreService
public CoreService()
-
-
Method Details
-
activate
Description copied from interface:ComponentActivates the component.This method is called by the runtime when a component is activated.
- Specified by:
activatein interfaceComponent- Overrides:
activatein classDefaultComponent- Parameters:
context- the runtime context
-
deactivate
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
-
registerContribution
- Overrides:
registerContributionin classDefaultComponent
-
unregisterContribution
- Overrides:
unregisterContributionin classDefaultComponent
-
registerVersionRemovalPolicy
-
unregisterVersionRemovalPolicy
-
registerOrphanVersionRemovalFilter
protected void registerOrphanVersionRemovalFilter(CoreServiceOrphanVersionRemovalFilterDescriptor contrib) -
unregisterOrphanVersionRemovalFilter
protected void unregisterOrphanVersionRemovalFilter(CoreServiceOrphanVersionRemovalFilterDescriptor contrib) -
getVersionRemovalPolicy
Gets the last version removal policy registered. -
getOrphanVersionRemovalFilters
Gets all the orphan version removal filters registered. -
garbageCollectOrphanVersions
public void garbageCollectOrphanVersions()Schedule a removal of the orphan versions through BAF.A version stays referenced, and therefore is not removed, if any proxy points to a version in the version history of any live document, or in the case of tree snapshot if there is a snapshot containing a version in the version history of any live document.
- Since:
- 2023
-
cleanupOrphanVersions
Deprecated.since 2023 usegarbageCollectOrphanVersions()instead.Removes the orphan versions.A version stays referenced, and therefore is not removed, if any proxy points to a version in the version history of any live document. Warning: this implementation does NOT take into account contribution made to the orphanVersionRemovalFilter extension point.
- Parameters:
commitSize- the maximum number of orphan versions to delete in one transaction- Returns:
- the number of orphan versions deleted
- Since:
- 9.1
-
doCleanupOrphanVersions
-
garbageCollectOrphanVersions()instead.