Interface CDORevisionManager
- All Superinterfaces:
org.eclipse.net4j.util.event.INotifier
- All Known Subinterfaces:
InternalCDORevisionManager
- All Known Implementing Classes:
DelegatingCDORevisionManager
revisions in a CDO repository by demand loading
and caching them.
Revisions are generally queried by:
If querying by timestamp it's also possible to ask for multiple revisions (identified by a list of object IDs) in one
round trip (to the server if this revision manager is contained by a session or to the
backend store if it is contained by a repository.
- Since:
- 3.0
- Author:
- Eike Stepper
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA fluent, manager-bound request for loading one or more revisions.Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
org.eclipse.net4j.util.event.INotifier.INotifier2 -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsRevision(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.getObjectLifetime(CDOID id, CDOBranchPoint branchPoint) getObjectType(CDOID id) Returns thetypeof an object if a revision for that object is in the revision cache,nullotherwise.getObjectType(CDOID id, CDOBranchManager branchManagerForLoadOnDemand) Returns thetypeof an object.getRevision(CDOID id, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand) Deprecated.getRevision(CDOID id, CDOBranchPoint branchPoint, CDORevisionManager.Request.Config config) Loads revisions using the canonical request configuration.getRevisionByVersion(CDOID id, CDOBranchVersion branchVersion, int referenceChunk, boolean loadOnDemand) Deprecated.As of 4.37 userequest()to configure and execute a revision request.getRevisionByVersion(CDOID id, CDOBranchVersion branchVersion, CDORevisionManager.Request.Config config) Loads a revision by version using the canonical request configuration.getRevisions(List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand) Deprecated.As of 4.37 userequest()to configure and execute a revision request.getRevisions(List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand, List<CDORevision> additionalRevisions) Deprecated.As of 4.37 userequest()to configure and execute a revision request.getRevisions(List<CDOID> ids, CDOBranchPoint branchPoint, CDORevisionManager.Request.Config config) Loads revisions using the canonical request configuration.getRevisions(List<CDOID> ids, CDOBranchPoint branchPoint, CDORevisionManager.Request.Config config, List<CDORevision> additionalRevisions) Loads revisions using the canonical request configuration and collects additionally prefetched revisions in the supplied result channel.voidhandleRevisions(EClass eClass, CDOBranch branch, boolean exactBranch, long timeStamp, boolean exactTime, CDORevisionHandler handler) default CDORevisionManager.Requestrequest()Creates a manager-bound fluent request for loading revisions.Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
-
Method Details
-
getRevision
CDORevision getRevision(CDOID id, CDOBranchPoint branchPoint, CDORevisionManager.Request.Config config) Loads revisions using the canonical request configuration.- Parameters:
id- the ID of the requested objectbranchPoint- the branch point at which to load the revisionconfig- the immutable loading configuration- Returns:
- the revision, or
nullif it does not exist or lookup is cache-only and the cache misses - Since:
- 4.29
- See Also:
-
getRevisions
List<CDORevision> getRevisions(List<CDOID> ids, CDOBranchPoint branchPoint, CDORevisionManager.Request.Config config) Loads revisions using the canonical request configuration. Options that do not apply to this operation are ignored.- Parameters:
ids- the IDs of the requested objectsbranchPoint- the branch point at which to load the revisionsconfig- the immutable loading configuration- Returns:
- the requested revisions, with
nullentries for revisions that could not be found - Since:
- 4.29
- See Also:
-
getRevisions
List<CDORevision> getRevisions(List<CDOID> ids, CDOBranchPoint branchPoint, CDORevisionManager.Request.Config config, List<CDORevision> additionalRevisions) Loads revisions using the canonical request configuration and collects additionally prefetched revisions in the supplied result channel. Options that do not apply to this operation are ignored.- Parameters:
ids- the IDs of the requested objectsbranchPoint- the branch point at which to load the revisionsconfig- the immutable loading configurationadditionalRevisions- the optional result channel for additionally prefetched revisions- Returns:
- the requested revisions, with
nullentries for revisions that could not be found - Since:
- 4.29
- See Also:
-
getRevisionByVersion
CDORevision getRevisionByVersion(CDOID id, CDOBranchVersion branchVersion, CDORevisionManager.Request.Config config) Loads a revision by version using the canonical request configuration. Containment prefetch depth is ignored by this operation because it does not support containment prefetching.- Parameters:
id- the ID of the requested objectbranchVersion- the branch version at which to load the revisionconfig- the immutable loading configuration- Returns:
- the revision, or
nullif it does not exist or lookup is cache-only and the cache misses - Since:
- 4.29
- See Also:
-
getObjectType
Returns thetypeof an object if a revision for that object is in the revision cache,nullotherwise.Same as calling
getObjectType(id, null).- See Also:
-
getObjectType
Returns 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.- Since:
- 4.1
- See Also:
- If
-
containsRevision
Returnstrueif therevision cachecontains arevisionwith the givenIDat the givenbranch point(branch + timestamp),falseotherwise.- See Also:
-
getObjectLifetime
- Since:
- 4.4
-
handleRevisions
void handleRevisions(EClass eClass, CDOBranch branch, boolean exactBranch, long timeStamp, boolean exactTime, CDORevisionHandler handler) - Since:
- 4.3
-
request
Creates a manager-bound fluent request for loading revisions. Each terminal operation takes an immutable snapshot of the current options, so subsequent changes to the request do not affect an operation already in progress.- Since:
- 4.29
-
getRevision
@Deprecated CDORevision getRevision(CDOID id, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand) Deprecated.As of 4.37 userequest()to configure and execute a revision request.Returns therevisionwith the givenIDat the givenbranch point(branch + timestamp), optionally demand loading it if it is not already in thecache.- Parameters:
referenceChunk- The number of targetIDsto load for each many-valued reference in the returned revision, orCDORevision.UNCHUNKEDfor all such list elements (IDs).prefetchDepth- The number of nested containment levels to load revisions for in one round trip. Use the symbolic constantsCDORevision.DEPTH_INFINITEto prefetch all contained revisions orCDORevision.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 ornullis returned.- See Also:
-
getRevisions
@Deprecated List<CDORevision> getRevisions(List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand) Deprecated.As of 4.37 userequest()to configure and execute a revision request.Returns therevisionswith the givenIDsat the givenbranch point(branch + timestamp), optionally demand loading them if they are not already in thecache.- Parameters:
referenceChunk- The number of targetIDsto load for each many-valued reference in the returned revisions, orCDORevision.UNCHUNKEDfor all such list elements (IDs).prefetchDepth- The number of nested containment levels to load revisions for in one round trip. Use the symbolic constantsCDORevision.DEPTH_INFINITEto prefetch all contained revisions orCDORevision.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 ornullis placed in the list that is returned.- See Also:
-
getRevisions
@Deprecated List<CDORevision> getRevisions(List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand, List<CDORevision> additionalRevisions) Deprecated.As of 4.37 userequest()to configure and execute a revision request.Returns therevisionswith the givenIDsat the givenbranch point(branch + timestamp), optionally demand loading them if they are not already in thecache.- Parameters:
referenceChunk- The number of targetIDsto load for each many-valued reference in the returned revisions, orCDORevision.UNCHUNKEDfor all such list elements (IDs).prefetchDepth- The number of nested containment levels to load revisions for in one round trip. Use the symbolic constantsCDORevision.DEPTH_INFINITEto prefetch all contained revisions orCDORevision.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 ornullis placed in the list that is returned.additionalRevisions- If non-null, a list to add additionally prefetched revisions to.- Since:
- 4.15
- See Also:
-
containsRevisionByVersion
Returnstrueif therevision cachecontains arevisionwith the givenIDat the givenbranch version(branch + version),falseotherwise.- See Also:
-
getRevisionByVersion
@Deprecated CDORevision getRevisionByVersion(CDOID id, CDOBranchVersion branchVersion, int referenceChunk, boolean loadOnDemand) Deprecated.As of 4.37 userequest()to configure and execute a revision request.Returns 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 criterion for a consistent graph of multiple revisions.
- Parameters:
referenceChunk- The number of targetIDsto load for each many-valued reference in the returned revision, orCDORevision.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 ornullis returned.- See Also:
-
request()to configure and execute a revision request.