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, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplicationStarted, getApplicationStartedOrderprotected 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)
ComponentThis method is called by the runtime when a component is activated.
activate in interface Componentactivate in class DefaultComponentcontext - the runtime contextpublic void deactivate(ComponentContext context)
ComponentThis method is called by the runtime when a component is deactivated.
deactivate in interface Componentdeactivate in class DefaultComponentcontext - the runtime contextpublic void registerContribution(Object contrib, String point, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic void unregisterContribution(Object contrib, String point, ComponentInstance contributor)
unregisterContribution in class DefaultComponentprotected 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.