Class RevisionContextWrapper
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.RevisionContextWrapper
-
- All Implemented Interfaces:
RevisionContext
public final class RevisionContextWrapper extends Object implements RevisionContext
Wraps an existing revision context and exposes a customclusterId.
-
-
Constructor Summary
Constructors Constructor Description RevisionContextWrapper(RevisionContext context, int clusterId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.jackrabbit.oak.plugins.document.UnmergedBranchesgetBranches()@NotNull ClockgetClock()intgetClusterId()StringgetCommitValue(@NotNull Revision revision, @NotNull NodeDocument nodeDocument)Retrieves the commit value for a given change.@NotNull RevisionVectorgetHeadRevision()org.apache.jackrabbit.oak.plugins.document.UnsavedModificationsgetPendingModifications()@NotNull RevisionnewRevision()
-
-
-
Constructor Detail
-
RevisionContextWrapper
public RevisionContextWrapper(RevisionContext context, int clusterId)
-
-
Method Detail
-
getBranches
public org.apache.jackrabbit.oak.plugins.document.UnmergedBranches getBranches()
- Specified by:
getBranchesin interfaceRevisionContext- Returns:
- the branches of the local DocumentMK instance, which are not yet merged.
-
getPendingModifications
public org.apache.jackrabbit.oak.plugins.document.UnsavedModifications getPendingModifications()
- Specified by:
getPendingModificationsin interfaceRevisionContext- Returns:
- the pending modifications.
-
getClusterId
public int getClusterId()
- Specified by:
getClusterIdin interfaceRevisionContext- Returns:
- the cluster id of the local DocumentMK instance.
-
getHeadRevision
@NotNull public @NotNull RevisionVector getHeadRevision()
- Specified by:
getHeadRevisionin interfaceRevisionContext- Returns:
- the current head revision.
-
newRevision
@NotNull public @NotNull Revision newRevision()
- Specified by:
newRevisionin interfaceRevisionContext- Returns:
- a new revision for the local document node store instance.
-
getClock
@NotNull public @NotNull Clock getClock()
- Specified by:
getClockin interfaceRevisionContext- Returns:
- the clock in use when a new revision is created.
-
getCommitValue
public String getCommitValue(@NotNull @NotNull Revision revision, @NotNull @NotNull NodeDocument nodeDocument)
Description copied from interface:RevisionContextRetrieves 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.
- Specified by:
getCommitValuein interfaceRevisionContext- Parameters:
revision- the revision a change was made.nodeDocument- the document where the change was made.- Returns:
- the commit value or
nullif the change does not have a commit value (yet).
-
-