public class CoreService extends DefaultComponent
Modifier and Type | Field and Description |
---|---|
protected ComponentContext |
context |
protected static DefaultVersionRemovalPolicy |
DEFAULT_VERSION_REMOVAL_POLICY |
protected Map<CoreServiceOrphanVersionRemovalFilterDescriptor,OrphanVersionRemovalFilter> |
orphanVersionRemovalFilters |
protected Map<CoreServicePolicyDescriptor,VersionRemovalPolicy> |
versionRemovalPolicies |
lastModified
Constructor and Description |
---|
CoreService() |
getAdapter, getLastModified, registerExtension, setLastModified, setModifiedNow, start, stop, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
protected static final DefaultVersionRemovalPolicy DEFAULT_VERSION_REMOVAL_POLICY
protected Map<CoreServicePolicyDescriptor,VersionRemovalPolicy> versionRemovalPolicies
protected Map<CoreServiceOrphanVersionRemovalFilterDescriptor,OrphanVersionRemovalFilter> orphanVersionRemovalFilters
protected ComponentContext context
public CoreService()
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic void registerContribution(Object contrib, String point, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contrib, String point, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
protected void registerVersionRemovalPolicy(CoreServicePolicyDescriptor contrib)
protected void unregisterVersionRemovalPolicy(CoreServicePolicyDescriptor contrib)
protected void registerOrphanVersionRemovalFilter(CoreServiceOrphanVersionRemovalFilterDescriptor contrib)
protected void unregisterOrphanVersionRemovalFilter(CoreServiceOrphanVersionRemovalFilterDescriptor contrib)
public VersionRemovalPolicy getVersionRemovalPolicy()
public Collection<OrphanVersionRemovalFilter> getOrphanVersionRemovalFilters()
public long cleanupOrphanVersions(long commitSize)
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.
commitSize
- the maximum number of orphan versions to delete in one transactionprotected long doCleanupOrphanVersions(CoreSession session, long commitSize)
Copyright © 2018 Nuxeo. All rights reserved.