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 classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
org.eclipse.net4j.util.event.INotifier.INotifier2
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsRevision
(CDOID id, CDOBranchPoint branchPoint) Returnstrue
if therevision cache
contains arevision
with the givenID
at the givenbranch point
(branch + timestamp),false
otherwise.boolean
containsRevisionByVersion
(CDOID id, CDOBranchVersion branchVersion) Returnstrue
if therevision cache
contains arevision
with the givenID
at the givenbranch version
(branch + version),false
otherwise.getObjectLifetime
(CDOID id, CDOBranchPoint branchPoint) getObjectType
(CDOID id) Returns thetype
of an object if a revision for that object is in the revision cache,null
otherwise.getObjectType
(CDOID id, CDOBranchManager branchManagerForLoadOnDemand) Returns thetype
of an object.getRevision
(CDOID id, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand) Returns therevision
with the givenID
at the givenbranch point
(branch + timestamp), optionally demand loading it if it is not already in thecache
.getRevisionByVersion
(CDOID id, CDOBranchVersion branchVersion, int referenceChunk, boolean loadOnDemand) Returns therevision
with the givenID
at the givenbranch version
(branch + version), optionally demand loading it if it is not already in thecache
.getRevisions
(List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand) Returns therevisions
with the givenIDs
at the givenbranch point
(branch + timestamp), optionally demand loading them if they are not already in thecache
.getRevisions
(List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand, List<CDORevision> additionalRevisions) Returns therevisions
with the givenIDs
at the givenbranch point
(branch + timestamp), optionally demand loading them if they are not already in thecache
.void
handleRevisions
(EClass eClass, CDOBranch branch, boolean exactBranch, long timeStamp, boolean exactTime, CDORevisionHandler handler) Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
-
Method Details
-
getObjectType
Returns thetype
of an object if a revision for that object is in the revision cache,null
otherwise.Same as calling
getObjectType(id, null)
. -
getObjectType
Returns thetype
of an object.If no revision for that object is found in the revision cache the following is tried:
- If
branchManagerForLoadOnDemand
is notnull
the first revision of the object in the main branch is loaded from the server and its type is returned. - Otherwise (i.e., if
branchManagerForLoadOnDemand
isnull
or the object does not exist)null
is returned.
A
branch manager
is 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 branch
while demand-loading.- Since:
- 4.1
- See Also:
- If
-
containsRevision
Returnstrue
if therevision cache
contains arevision
with the givenID
at the givenbranch point
(branch + timestamp),false
otherwise. -
getRevision
CDORevision getRevision(CDOID id, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand) Returns therevision
with the givenID
at the givenbranch point
(branch + timestamp), optionally demand loading it if it is not already in thecache
.- Parameters:
referenceChunk
- The number of targetIDs
to load for each many-valued reference in the returned revision, orCDORevision.UNCHUNKED
for 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_INFINITE
to prefetch all contained revisions orCDORevision.DEPTH_NONE
to 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 ornull
is returned.- See Also:
-
getRevisions
List<CDORevision> getRevisions(List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand) Returns therevisions
with the givenIDs
at the givenbranch point
(branch + timestamp), optionally demand loading them if they are not already in thecache
.- Parameters:
referenceChunk
- The number of targetIDs
to load for each many-valued reference in the returned revisions, orCDORevision.UNCHUNKED
for 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_INFINITE
to prefetch all contained revisions orCDORevision.DEPTH_NONE
to 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 ornull
is placed in the list that is returned.- See Also:
-
getRevisions
List<CDORevision> getRevisions(List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand, List<CDORevision> additionalRevisions) Returns therevisions
with the givenIDs
at the givenbranch point
(branch + timestamp), optionally demand loading them if they are not already in thecache
.- Parameters:
referenceChunk
- The number of targetIDs
to load for each many-valued reference in the returned revisions, orCDORevision.UNCHUNKED
for 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_INFINITE
to prefetch all contained revisions orCDORevision.DEPTH_NONE
to 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 ornull
is 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
Returnstrue
if therevision cache
contains arevision
with the givenID
at the givenbranch version
(branch + version),false
otherwise. -
getRevisionByVersion
CDORevision getRevisionByVersion(CDOID id, CDOBranchVersion branchVersion, int referenceChunk, boolean loadOnDemand) Returns therevision
with the givenID
at 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.
- Parameters:
referenceChunk
- The number of targetIDs
to load for each many-valued reference in the returned revision, orCDORevision.UNCHUNKED
for 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 ornull
is returned.- See Also:
-
getObjectLifetime
- Since:
- 4.4
-
handleRevisions
void handleRevisions(EClass eClass, CDOBranch branch, boolean exactBranch, long timeStamp, boolean exactTime, CDORevisionHandler handler) - Since:
- 4.3
-