Class DelegatingCDORevisionManager
- java.lang.Object
- 
- org.eclipse.net4j.util.event.Notifier
- 
- org.eclipse.net4j.util.lifecycle.Lifecycle
- 
- org.eclipse.emf.cdo.spi.common.revision.DelegatingCDORevisionManager
 
 
 
- 
- All Implemented Interfaces:
- CDORevisionCacheAdder,- CDORevisionInterner,- CDORevisionManager,- InternalCDORevisionManager,- org.eclipse.net4j.util.event.INotifier,- org.eclipse.net4j.util.event.INotifier.INotifier2,- org.eclipse.net4j.util.lifecycle.IDeactivateable,- org.eclipse.net4j.util.lifecycle.ILifecycle,- org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation
 
 public abstract class DelegatingCDORevisionManager extends org.eclipse.net4j.util.lifecycle.Lifecycle implements InternalCDORevisionManager If the meaning of this type isn't clear, there really should be more of a description here...- Since:
- 3.0
- Author:
- Eike Stepper
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycleorg.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation
 - 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifierorg.eclipse.net4j.util.event.INotifier.INotifier2
 - 
Nested classes/interfaces inherited from interface org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionManagerInternalCDORevisionManager.RevisionLoader, InternalCDORevisionManager.RevisionLoader2, InternalCDORevisionManager.RevisionLoader3, InternalCDORevisionManager.RevisionLocker
 
- 
 - 
Constructor SummaryConstructors Constructor Description DelegatingCDORevisionManager()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddRevision(CDORevision revision)Deprecated.booleancontainsRevision(CDOID id, CDOBranchPoint branchPoint)Returnstrueif therevision cachecontains arevisionwith the givenIDat the givenbranch point(branch + timestamp),falseotherwise.booleancontainsRevisionByVersion(CDOID id, CDOBranchVersion branchVersion)Returnstrueif therevision cachecontains arevisionwith the givenIDat the givenbranch version(branch + version),falseotherwise.protected voiddoActivate()protected voiddoDeactivate()InternalCDORevisiongetBaseRevision(CDORevision revision, int referenceChunk, boolean loadOnDemand)InternalCDORevisionCachegetCache()protected abstract InternalCDORevisionManagergetDelegate()CDORevisionFactorygetFactory()CDOBranchPointRangegetObjectLifetime(CDOID id, CDOBranchPoint branchPoint)org.eclipse.emf.ecore.EClassgetObjectType(CDOID id)Returns thetypeof an object if a revision for that object is in the revision cache,nullotherwise.org.eclipse.emf.ecore.EClassgetObjectType(CDOID id, CDOBranchManager branchManagerForLoadOnDemand)Returns thetypeof an object.InternalCDORevisiongetRevision(CDOID id, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand)Returns therevisionwith the givenIDat the givenbranch point(branch + timestamp), optionally demand loading it if it is not already in thecache.InternalCDORevisiongetRevision(CDOID id, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand, SyntheticCDORevision[] synthetics)InternalCDORevisiongetRevisionByVersion(CDOID id, CDOBranchVersion branchVersion, int referenceChunk, boolean loadOnDemand)Returns therevisionwith the givenIDat the givenbranch version(branch + version), optionally demand loading it if it is not already in thecache.InternalCDORevisionManager.RevisionLoadergetRevisionLoader()InternalCDORevisionManager.RevisionLockergetRevisionLocker()java.util.List<CDORevision>getRevisions(java.util.List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand)Returns therevisionswith the givenIDsat the givenbranch point(branch + timestamp), optionally demand loading them if they are not already in thecache.java.util.List<CDORevision>getRevisions(java.util.List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean prefetchLockStates, boolean loadOnDemand, SyntheticCDORevision[] synthetics)java.util.List<CDORevision>getRevisions(java.util.List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand, java.util.List<CDORevision> additionalRevisions)Returns therevisionswith the givenIDsat the givenbranch point(branch + timestamp), optionally demand loading them if they are not already in thecache.java.util.List<CDORevision>getRevisions(java.util.List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand, SyntheticCDORevision[] synthetics)voidhandleRevisions(org.eclipse.emf.ecore.EClass eClass, CDOBranch branch, boolean exactBranch, long timeStamp, boolean exactTime, CDORevisionHandler handler)CDORevisioninternRevision(CDORevision revision)Interns the given revision and returns either the given revision or a revision with the samekeythat was interned previously.protected booleanisDelegatingLifecycle()booleanisSupportingAudits()booleanisSupportingBranches()voidprefetchRevisions(CDOID id, CDOBranchPoint branchPoint, int prefetchDepth, boolean prefetchLockStates, java.util.function.Consumer<CDORevision> consumer)voidreviseLatest(CDOID id, CDOBranch branch)Called on client via postCommit when there is no version of detached objects available.voidreviseVersion(CDOID id, CDOBranchVersion branchVersion, long timeStamp)voidsetCache(CDORevisionCache cache)voidsetFactory(CDORevisionFactory factory)voidsetRevisionLoader(InternalCDORevisionManager.RevisionLoader revisionLoader)voidsetRevisionLocker(InternalCDORevisionManager.RevisionLocker revisionLocker)voidsetSupportingAudits(boolean on)voidsetSupportingBranches(boolean on)- 
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycleactivate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
 - 
Methods inherited from class org.eclipse.net4j.util.event.NotifieraddListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
- 
 
- 
- 
- 
Method Detail- 
getCachepublic InternalCDORevisionCache getCache() - Specified by:
- getCachein interface- InternalCDORevisionManager
 
 - 
setCachepublic void setCache(CDORevisionCache cache) - Specified by:
- setCachein interface- InternalCDORevisionManager
- Since:
- 4.0
 
 - 
setFactorypublic void setFactory(CDORevisionFactory factory) - Specified by:
- setFactoryin interface- InternalCDORevisionManager
 
 - 
getFactorypublic CDORevisionFactory getFactory() - Specified by:
- getFactoryin interface- InternalCDORevisionManager
 
 - 
getRevisionLoaderpublic InternalCDORevisionManager.RevisionLoader getRevisionLoader() - Specified by:
- getRevisionLoaderin interface- InternalCDORevisionManager
 
 - 
setRevisionLoaderpublic void setRevisionLoader(InternalCDORevisionManager.RevisionLoader revisionLoader) - Specified by:
- setRevisionLoaderin interface- InternalCDORevisionManager
 
 - 
getRevisionLockerpublic InternalCDORevisionManager.RevisionLocker getRevisionLocker() - Specified by:
- getRevisionLockerin interface- InternalCDORevisionManager
 
 - 
setRevisionLockerpublic void setRevisionLocker(InternalCDORevisionManager.RevisionLocker revisionLocker) - Specified by:
- setRevisionLockerin interface- InternalCDORevisionManager
 
 - 
isSupportingAuditspublic boolean isSupportingAudits() - Specified by:
- isSupportingAuditsin interface- InternalCDORevisionManager
- Since:
- 4.0
 
 - 
setSupportingAuditspublic void setSupportingAudits(boolean on) - Specified by:
- setSupportingAuditsin interface- InternalCDORevisionManager
- Since:
- 4.0
 
 - 
isSupportingBranchespublic boolean isSupportingBranches() - Specified by:
- isSupportingBranchesin interface- InternalCDORevisionManager
 
 - 
setSupportingBranchespublic void setSupportingBranches(boolean on) - Specified by:
- setSupportingBranchesin interface- InternalCDORevisionManager
 
 - 
addRevision@Deprecated public void addRevision(CDORevision revision) Deprecated.Description copied from interface:CDORevisionCacheAdderAdds the given revision to this cache.- Specified by:
- addRevisionin interface- CDORevisionCacheAdder
- Specified by:
- addRevisionin interface- InternalCDORevisionManager
- Since:
- 4.0
 
 - 
internRevisionpublic CDORevision internRevision(CDORevision revision) Description copied from interface:CDORevisionInternerInterns the given revision and returns either the given revision or a revision with the samekeythat was interned previously.The returned revision is only different from the passed revision if this interner contains a previously cached, different revision instance with an equal revision key.- Specified by:
- internRevisionin interface- CDORevisionInterner
 
 - 
containsRevisionpublic boolean containsRevision(CDOID id, CDOBranchPoint branchPoint) Description copied from interface:CDORevisionManagerReturnstrueif therevision cachecontains arevisionwith the givenIDat the givenbranch point(branch + timestamp),falseotherwise.
 - 
containsRevisionByVersionpublic boolean containsRevisionByVersion(CDOID id, CDOBranchVersion branchVersion) Description copied from interface:CDORevisionManagerReturnstrueif therevision cachecontains arevisionwith the givenIDat the givenbranch version(branch + version),falseotherwise.- Specified by:
- containsRevisionByVersionin interface- CDORevisionManager
- See Also:
- CDORevisionManager.getRevisionByVersion(CDOID, CDOBranchVersion, int, boolean)
 
 - 
getObjectTypepublic org.eclipse.emf.ecore.EClass getObjectType(CDOID id) Description copied from interface:CDORevisionManagerReturns thetypeof an object if a revision for that object is in the revision cache,nullotherwise.Same as calling getObjectType(id, null).- Specified by:
- getObjectTypein interface- CDORevisionManager
- See Also:
- EObject.eClass(),- CDORevisionManager.getObjectType(CDOID, CDOBranchManager)
 
 - 
getObjectTypepublic org.eclipse.emf.ecore.EClass getObjectType(CDOID id, CDOBranchManager branchManagerForLoadOnDemand) Description copied from interface:CDORevisionManagerReturns thetypeof an object.If no revision for that object is found in the revision cache the following is tried: - If branchManagerForLoadOnDemandis notnullthe first revision of the object in the main branch is loaded from the server and its type is returned.
- Otherwise (i.e., if branchManagerForLoadOnDemandisnullor the object does not exist)nullis returned.
 A branch manageris required instead of just a boolean value to specify whether to demand-load or not because this revision manager must be able to access themain branchwhile demand-loading.- Specified by:
- getObjectTypein interface- CDORevisionManager
- See Also:
- EObject.eClass(),- CDORevisionManager.getObjectType(CDOID)
 
- If 
 - 
getObjectLifetimepublic CDOBranchPointRange getObjectLifetime(CDOID id, CDOBranchPoint branchPoint) - Specified by:
- getObjectLifetimein interface- CDORevisionManager
 
 - 
getBaseRevisionpublic InternalCDORevision getBaseRevision(CDORevision revision, int referenceChunk, boolean loadOnDemand) - Specified by:
- getBaseRevisionin interface- InternalCDORevisionManager
 
 - 
getRevisionByVersionpublic InternalCDORevision getRevisionByVersion(CDOID id, CDOBranchVersion branchVersion, int referenceChunk, boolean loadOnDemand) Description copied from interface:CDORevisionManagerReturns therevisionwith the givenIDat the givenbranch version(branch + version), optionally demand loading it if it is not already in thecache.Prefetching of nested containment levels is not support by this method because the version of a particular revision can not serve as a reasonable baseline criterium for a consistent graph of multiple revisions. - Specified by:
- getRevisionByVersionin interface- CDORevisionManager
- Specified by:
- getRevisionByVersionin interface- InternalCDORevisionManager
- referenceChunk- The number of target- IDsto load for each many-valued reference in the returned revision, or- CDORevision.UNCHUNKEDfor all such list elements (IDs).
- loadOnDemand- If the requested revision is not contained in the revision cache it depends on this parameter's value whether the revision is loaded from the server or- nullis returned.
- See Also:
- CDORevisionManager.getRevision(CDOID, CDOBranchPoint, int, int, boolean)
 
 - 
getRevisionpublic InternalCDORevision getRevision(CDOID id, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand) Description copied from interface:CDORevisionManagerReturns therevisionwith the givenIDat the givenbranch point(branch + timestamp), optionally demand loading it if it is not already in thecache.- Specified by:
- getRevisionin interface- CDORevisionManager
- Specified by:
- getRevisionin interface- InternalCDORevisionManager
- referenceChunk- The number of target- IDsto load for each many-valued reference in the returned revision, or- CDORevision.UNCHUNKEDfor all such list elements (IDs).
- prefetchDepth- The number of nested containment levels to load revisions for in one round trip. Use the symbolic constants- CDORevision.DEPTH_INFINITEto prefetch all contained revisions or- CDORevision.DEPTH_NONEto not prefetch anything. Only the explicitly requested revision is returned by this method. If additional revisions are prefetched they are placed in the revision cache to speed up subsequent calls to this method.
- loadOnDemand- If the requested revision is not contained in the revision cache it depends on this parameter's value whether the revision is loaded from the server or- nullis returned.
- See Also:
- CDORevisionManager.getRevisions(List, CDOBranchPoint, int, int, boolean),- CDORevisionManager.getRevisionByVersion(CDOID, CDOBranchVersion, int, boolean)
 
 - 
getRevisionpublic InternalCDORevision getRevision(CDOID id, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand, SyntheticCDORevision[] synthetics) - Specified by:
- getRevisionin interface- InternalCDORevisionManager
 
 - 
getRevisionspublic java.util.List<CDORevision> getRevisions(java.util.List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand) Description copied from interface:CDORevisionManagerReturns therevisionswith the givenIDsat the givenbranch point(branch + timestamp), optionally demand loading them if they are not already in thecache.- Specified by:
- getRevisionsin interface- CDORevisionManager
- referenceChunk- The number of target- IDsto load for each many-valued reference in the returned revisions, or- CDORevision.UNCHUNKEDfor all such list elements (IDs).
- prefetchDepth- The number of nested containment levels to load revisions for in one round trip. Use the symbolic constants- CDORevision.DEPTH_INFINITEto prefetch all contained revisions or- CDORevision.DEPTH_NONEto not prefetch anything. Only the explicitly requested revisions are returned by this method. If additional revisions are prefetched they are placed in the revision cache to speed up subsequent calls to this method.
- loadOnDemand- If one or more of the requested revisions is/are not contained in the revision cache it depends on this parameter's value whether the revision(s) is/are loaded from the server or- nullis placed in the list that is returned.
- See Also:
- CDORevisionManager.getRevision(CDOID, CDOBranchPoint, int, int, boolean)
 
 - 
getRevisionspublic java.util.List<CDORevision> getRevisions(java.util.List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand, SyntheticCDORevision[] synthetics) - Specified by:
- getRevisionsin interface- InternalCDORevisionManager
 
 - 
getRevisionspublic java.util.List<CDORevision> getRevisions(java.util.List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean prefetchLockStates, boolean loadOnDemand, SyntheticCDORevision[] synthetics) - Specified by:
- getRevisionsin interface- InternalCDORevisionManager
 
 - 
getRevisionspublic java.util.List<CDORevision> getRevisions(java.util.List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand, java.util.List<CDORevision> additionalRevisions) Description copied from interface:CDORevisionManagerReturns therevisionswith the givenIDsat the givenbranch point(branch + timestamp), optionally demand loading them if they are not already in thecache.- Specified by:
- getRevisionsin interface- CDORevisionManager
- referenceChunk- The number of target- IDsto load for each many-valued reference in the returned revisions, or- CDORevision.UNCHUNKEDfor all such list elements (IDs).
- prefetchDepth- The number of nested containment levels to load revisions for in one round trip. Use the symbolic constants- CDORevision.DEPTH_INFINITEto prefetch all contained revisions or- CDORevision.DEPTH_NONEto not prefetch anything. Only the explicitly requested revisions are returned by this method. If additional revisions are prefetched they are placed in the revision cache to speed up subsequent calls to this method.
- loadOnDemand- If one or more of the requested revisions is/are not contained in the revision cache it depends on this parameter's value whether the revision(s) is/are loaded from the server or- nullis placed in the list that is returned.
- additionalRevisions- If non-- null, a list to add additionally prefetched revisions to.
- Since:
- 4.15
- See Also:
- CDORevisionManager.getRevision(CDOID, CDOBranchPoint, int, int, boolean)
 
 - 
prefetchRevisionspublic void prefetchRevisions(CDOID id, CDOBranchPoint branchPoint, int prefetchDepth, boolean prefetchLockStates, java.util.function.Consumer<CDORevision> consumer) - Specified by:
- prefetchRevisionsin interface- InternalCDORevisionManager
 
 - 
handleRevisionspublic void handleRevisions(org.eclipse.emf.ecore.EClass eClass, CDOBranch branch, boolean exactBranch, long timeStamp, boolean exactTime, CDORevisionHandler handler)- Specified by:
- handleRevisionsin interface- CDORevisionManager
 
 - 
reviseLatestpublic void reviseLatest(CDOID id, CDOBranch branch) Description copied from interface:InternalCDORevisionManagerCalled on client via postCommit when there is no version of detached objects available.- Specified by:
- reviseLatestin interface- InternalCDORevisionManager
 
 - 
reviseVersionpublic void reviseVersion(CDOID id, CDOBranchVersion branchVersion, long timeStamp) - Specified by:
- reviseVersionin interface- InternalCDORevisionManager
 
 - 
doActivateprotected void doActivate() throws java.lang.Exception- Overrides:
- doActivatein class- org.eclipse.net4j.util.lifecycle.Lifecycle
- Throws:
- java.lang.Exception
 
 - 
doDeactivateprotected void doDeactivate() throws java.lang.Exception- Overrides:
- doDeactivatein class- org.eclipse.net4j.util.lifecycle.Lifecycle
- Throws:
- java.lang.Exception
 
 - 
isDelegatingLifecycleprotected boolean isDelegatingLifecycle() 
 - 
getDelegateprotected abstract InternalCDORevisionManager getDelegate() 
 
- 
 
-