Interface RevisionContext
- All Known Implementing Classes:
DocumentNodeStore
,RevisionContextWrapper
public interface RevisionContext
Provides revision related context.
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.jackrabbit.oak.plugins.document.UnmergedBranches
@NotNull Clock
getClock()
int
@Nullable String
getCommitValue
(@NotNull Revision changeRevision, @NotNull NodeDocument doc) Retrieves the commit value for a given change.@NotNull RevisionVector
org.apache.jackrabbit.oak.plugins.document.UnsavedModifications
@NotNull Revision
-
Method Details
-
getBranches
org.apache.jackrabbit.oak.plugins.document.UnmergedBranches getBranches()- Returns:
- the branches of the local DocumentMK instance, which are not yet merged.
-
getPendingModifications
org.apache.jackrabbit.oak.plugins.document.UnsavedModifications getPendingModifications()- Returns:
- the pending modifications.
-
getClusterId
int getClusterId()- Returns:
- the cluster id of the local DocumentMK instance.
-
getHeadRevision
- Returns:
- the current head revision.
-
newRevision
- Returns:
- a new revision for the local document node store instance.
-
getClock
- Returns:
- the clock in use when a new revision is created.
-
getCommitValue
@Nullable @Nullable String getCommitValue(@NotNull @NotNull Revision changeRevision, @NotNull @NotNull NodeDocument doc) Retrieves the commit value for a given change. This method returns the following types of commit values:- "c" : the change revision is committed as is.
- "c-rX-Y-Z" : the change revision is a branch commit merged in revision "rX-Y-Z".
- "brX-Y-Z" : the change revision is a branch commit done at "rX-Y-Z" but not yet merged.
null
: the change revision does not have an entry on the commit root document and is not committed.
- Parameters:
changeRevision
- the revision a change was made.doc
- the document where the change was made.- Returns:
- the commit value or
null
if the change does not have a commit value (yet).
-