| Package | Description |
|---|---|
| org.apache.jackrabbit.oak.json | |
| org.apache.jackrabbit.oak.plugins.memory | |
| org.apache.jackrabbit.oak.spi.commit | |
| org.apache.jackrabbit.oak.spi.state |
| Modifier and Type | Method and Description |
|---|---|
NodeState |
JsonDeserializer.deserialize(org.apache.jackrabbit.oak.commons.json.JsopReader reader) |
NodeState |
JsonDeserializer.deserialize(String json) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
JsopDiff.childNodeAdded(String name,
NodeState after) |
boolean |
JsopDiff.childNodeChanged(String name,
NodeState before,
NodeState after) |
boolean |
JsopDiff.childNodeDeleted(String name,
NodeState before) |
static String |
JsopDiff.diffToJsop(NodeState before,
NodeState after)
Create the JSOP diff between
before and after for
debugging purposes. |
void |
JsonSerializer.serialize(NodeState node) |
| Modifier and Type | Class and Description |
|---|---|
class |
EmptyNodeState
Singleton instances of empty and non-existent node states, i.e.
|
class |
ModifiedNodeState
Immutable snapshot of a mutable node state.
|
| Modifier and Type | Field and Description |
|---|---|
static NodeState |
EmptyNodeState.EMPTY_NODE |
static NodeState |
EmptyNodeState.MISSING_NODE |
| Modifier and Type | Method and Description |
|---|---|
static <E extends Map.Entry<String,? extends NodeState>> |
MemoryChildNodeEntry.iterable(Iterable<E> set) |
| Modifier and Type | Method and Description |
|---|---|
NodeState |
ModifiedNodeState.getBaseState() |
NodeState |
MemoryNodeBuilder.getBaseState() |
NodeState |
ModifiedNodeState.getChildNode(String name) |
NodeState |
EmptyNodeState.getChildNode(String name) |
NodeState |
MemoryNodeBuilder.getNodeState() |
NodeState |
MemoryChildNodeEntry.getNodeState() |
NodeState |
MemoryNodeStore.getRoot() |
NodeState |
MemoryNodeStore.merge(NodeBuilder builder,
CommitHook commitHook,
CommitInfo info)
This implementation is equal to first rebasing the builder and then applying it to a
new branch and immediately merging it back.
|
NodeState |
MemoryNodeStore.rebase(NodeBuilder builder)
This implementation is equal to applying the differences between the builders base state
and its head state to a fresh builder on the stores root state using
ConflictAnnotatingRebaseDiff for resolving
conflicts. |
NodeState |
MemoryNodeStore.reset(NodeBuilder builder)
This implementation is equal resetting the builder to the root of the store and returning
the resulting node state from the builder.
|
NodeState |
MemoryNodeStore.retrieve(String checkpoint) |
static NodeState |
ModifiedNodeState.squeeze(NodeState state)
"Squeezes"
ModifiedNodeState instances into equivalent
MemoryNodeStates. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
ModifiedNodeState.compareAgainstBaseState(NodeState base,
NodeStateDiff diff)
Since we keep track of an explicit base node state for a
ModifiedNodeState instance, we can do this in two steps:
first compare all the modified properties and child nodes to those
of the given base state, and then compare the base states to each
other, ignoring all changed properties and child nodes that were
already covered earlier. |
boolean |
EmptyNodeState.compareAgainstBaseState(NodeState base,
NodeStateDiff diff) |
static boolean |
EmptyNodeState.compareAgainstEmptyState(NodeState state,
NodeStateDiff diff) |
static boolean |
EmptyNodeState.isEmptyState(NodeState state) |
void |
MemoryNodeBuilder.reset(NodeState newBase)
Throws away all changes in this builder and resets the base to the
given node state.
|
protected void |
MemoryNodeBuilder.set(NodeState newState)
Replaces the current state of this builder with the given node state.
|
NodeBuilder |
MemoryNodeBuilder.setChildNode(String name,
NodeState state) |
static NodeState |
ModifiedNodeState.squeeze(NodeState state)
"Squeezes"
ModifiedNodeState instances into equivalent
MemoryNodeStates. |
| Constructor and Description |
|---|
MemoryChildNodeEntry(String name,
NodeState node)
Creates a child node entry with the given name and referenced
child node state.
|
MemoryNodeBuilder(NodeState base)
Creates a new in-memory node state builder rooted at
and based on the passed
base state. |
MemoryNodeStore(NodeState state) |
| Modifier and Type | Method and Description |
|---|---|
NodeState |
ResetCommitAttributeHook.processCommit(NodeState before,
NodeState after,
CommitInfo info) |
NodeState |
EmptyHook.processCommit(NodeState before,
NodeState after,
CommitInfo info) |
NodeState |
EditorHook.processCommit(NodeState before,
NodeState after,
CommitInfo info) |
NodeState |
CompositeHook.processCommit(NodeState before,
NodeState after,
CommitInfo info) |
NodeState |
CommitHook.processCommit(NodeState before,
NodeState after,
CommitInfo info)
Validates and/or modifies the given content change before it gets
persisted.
|
| Modifier and Type | Method and Description |
|---|---|
ThreeWayConflictHandler.Resolution |
ThreeWayConflictHandler.addExistingNode(NodeBuilder parent,
String name,
NodeState ours,
NodeState theirs)
The node
ours has been added to parent which conflicts
with node theirs which has been added in the persistence store. |
PartialConflictHandler.Resolution |
PartialConflictHandler.addExistingNode(NodeBuilder parent,
String name,
NodeState ours,
NodeState theirs)
Deprecated.
The node
ours has been added to parent which conflicts
with node theirs which has been added in the persistence store. |
PartialConflictHandler.Resolution |
ConflictHandler.addExistingNode(NodeBuilder parent,
String name,
NodeState ours,
NodeState theirs)
Deprecated.
The node
ours has been added to parent which conflicts
with node theirs which has been added in the persistence store. |
ThreeWayConflictHandler.Resolution |
CompositeConflictHandler.addExistingNode(NodeBuilder parent,
String name,
NodeState ours,
NodeState theirs) |
PartialConflictHandler.Resolution |
PartialConflictHandler.changeDeletedNode(NodeBuilder parent,
String name,
NodeState ours)
Deprecated.
The node
ours has been changed in parent while it was
removed in the persistence store. |
PartialConflictHandler.Resolution |
ConflictHandler.changeDeletedNode(NodeBuilder parent,
String name,
NodeState ours)
Deprecated.
The node
ours has been changed in parent while it was
removed in the persistence store. |
ThreeWayConflictHandler.Resolution |
ThreeWayConflictHandler.changeDeletedNode(NodeBuilder parent,
String name,
NodeState ours,
NodeState base)
The node
ours has been changed in parent while it was
removed in the persistence store. |
ThreeWayConflictHandler.Resolution |
CompositeConflictHandler.changeDeletedNode(NodeBuilder parent,
String name,
NodeState ours,
NodeState base) |
Validator |
VisibleValidator.childNodeAdded(String name,
NodeState after) |
Editor |
VisibleEditor.childNodeAdded(String name,
NodeState after) |
Validator |
Validator.childNodeAdded(String name,
NodeState after)
Validate an added node
|
Validator |
SubtreeValidator.childNodeAdded(String name,
NodeState after) |
Validator |
SubtreeExcludingValidator.childNodeAdded(String name,
NodeState after) |
Editor |
SubtreeEditor.childNodeAdded(String name,
NodeState after) |
Editor |
ProgressNotificationEditor.childNodeAdded(String name,
NodeState after) |
Validator |
FailingValidator.childNodeAdded(String name,
NodeState after) |
boolean |
EditorDiff.childNodeAdded(String name,
NodeState after) |
Editor |
Editor.childNodeAdded(String name,
NodeState after)
Processes an added child node.
|
Validator |
DefaultValidator.childNodeAdded(String name,
NodeState after) |
MoveValidator |
DefaultMoveValidator.childNodeAdded(String name,
NodeState after) |
Editor |
DefaultEditor.childNodeAdded(String name,
NodeState after) |
Editor |
CompositeEditor.childNodeAdded(String name,
NodeState after) |
Validator |
VisibleValidator.childNodeChanged(String name,
NodeState before,
NodeState after) |
Editor |
VisibleEditor.childNodeChanged(String name,
NodeState before,
NodeState after) |
Validator |
Validator.childNodeChanged(String name,
NodeState before,
NodeState after)
Validate a changed node
|
Validator |
SubtreeValidator.childNodeChanged(String name,
NodeState before,
NodeState after) |
Validator |
SubtreeExcludingValidator.childNodeChanged(String name,
NodeState before,
NodeState after) |
Editor |
SubtreeEditor.childNodeChanged(String name,
NodeState before,
NodeState after) |
Editor |
ProgressNotificationEditor.childNodeChanged(String name,
NodeState before,
NodeState after) |
Validator |
FailingValidator.childNodeChanged(String name,
NodeState before,
NodeState after) |
boolean |
EditorDiff.childNodeChanged(String name,
NodeState before,
NodeState after) |
Editor |
Editor.childNodeChanged(String name,
NodeState before,
NodeState after)
Processes a changed child node.
|
Validator |
DefaultValidator.childNodeChanged(String name,
NodeState before,
NodeState after) |
MoveValidator |
DefaultMoveValidator.childNodeChanged(String name,
NodeState before,
NodeState after) |
Editor |
DefaultEditor.childNodeChanged(String name,
NodeState before,
NodeState after) |
Editor |
CompositeEditor.childNodeChanged(String name,
NodeState before,
NodeState after) |
Validator |
VisibleValidator.childNodeDeleted(String name,
NodeState before) |
Editor |
VisibleEditor.childNodeDeleted(String name,
NodeState before) |
Validator |
Validator.childNodeDeleted(String name,
NodeState before)
Validate a deleted node
|
Validator |
SubtreeValidator.childNodeDeleted(String name,
NodeState before) |
Validator |
SubtreeExcludingValidator.childNodeDeleted(String name,
NodeState before) |
Editor |
SubtreeEditor.childNodeDeleted(String name,
NodeState before) |
Editor |
ProgressNotificationEditor.childNodeDeleted(String name,
NodeState before) |
Validator |
FailingValidator.childNodeDeleted(String name,
NodeState before) |
boolean |
EditorDiff.childNodeDeleted(String name,
NodeState before) |
Editor |
Editor.childNodeDeleted(String name,
NodeState before)
Processes a deleted child node.
|
Validator |
DefaultValidator.childNodeDeleted(String name,
NodeState before) |
MoveValidator |
DefaultMoveValidator.childNodeDeleted(String name,
NodeState before) |
Editor |
DefaultEditor.childNodeDeleted(String name,
NodeState before) |
Editor |
CompositeEditor.childNodeDeleted(String name,
NodeState before) |
void |
Observer.contentChanged(NodeState root,
CommitInfo info)
Observes a content change.
|
void |
EmptyObserver.contentChanged(NodeState root,
CommitInfo info) |
void |
DiffObserver.contentChanged(NodeState root,
CommitInfo info) |
void |
CompositeObserver.contentChanged(NodeState root,
CommitInfo info) |
void |
ChangeDispatcher.contentChanged(NodeState root,
CommitInfo info) |
void |
BackgroundObserver.contentChanged(NodeState root,
CommitInfo info) |
PartialConflictHandler.Resolution |
PartialConflictHandler.deleteChangedNode(NodeBuilder parent,
String name,
NodeState theirs)
Deprecated.
The node
theirs changed in the persistence store while it has been
deleted locally. |
PartialConflictHandler.Resolution |
ConflictHandler.deleteChangedNode(NodeBuilder parent,
String name,
NodeState theirs)
Deprecated.
The node
theirs changed in the persistence store while it has been
deleted locally. |
ThreeWayConflictHandler.Resolution |
ThreeWayConflictHandler.deleteChangedNode(NodeBuilder parent,
String name,
NodeState theirs,
NodeState base)
The node
theirs changed in the persistence store while it has been
deleted locally. |
ThreeWayConflictHandler.Resolution |
CompositeConflictHandler.deleteChangedNode(NodeBuilder parent,
String name,
NodeState theirs,
NodeState base) |
ThreeWayConflictHandler.Resolution |
ThreeWayConflictHandler.deleteDeletedNode(NodeBuilder parent,
String name,
NodeState base)
The node
name has been removed in parent while it was
also removed in the persistence store. |
ThreeWayConflictHandler.Resolution |
CompositeConflictHandler.deleteDeletedNode(NodeBuilder parent,
String name,
NodeState base) |
void |
VisibleValidator.enter(NodeState before,
NodeState after) |
void |
VisibleEditor.enter(NodeState before,
NodeState after) |
void |
ProgressNotificationEditor.enter(NodeState before,
NodeState after) |
void |
FailingValidator.enter(NodeState before,
NodeState after) |
void |
Editor.enter(NodeState before,
NodeState after)
Called before the given before and after states are compared.
|
void |
DefaultValidator.enter(NodeState before,
NodeState after) |
void |
DefaultEditor.enter(NodeState before,
NodeState after) |
void |
CompositeEditor.enter(NodeState before,
NodeState after) |
protected abstract NodeStateDiff |
DiffObserver.getRootDiff(NodeState before,
NodeState after,
CommitInfo info)
Returns the diff handler to be used for the given content change.
|
Editor |
WhiteboardEditorProvider.getRootEditor(NodeState before,
NodeState after,
NodeBuilder builder,
CommitInfo info) |
Editor |
ValidatorProvider.getRootEditor(NodeState before,
NodeState after,
NodeBuilder builder,
CommitInfo info) |
Editor |
EditorProvider.getRootEditor(NodeState before,
NodeState after,
NodeBuilder builder,
CommitInfo info)
Returns an editor for processing changes between the given two states.
|
Editor |
CompositeEditorProvider.getRootEditor(NodeState before,
NodeState after,
NodeBuilder builder,
CommitInfo info) |
protected abstract Validator |
ValidatorProvider.getRootValidator(NodeState before,
NodeState after,
CommitInfo info)
Returns a validator for checking the changes between the given
two root states.
|
void |
VisibleValidator.leave(NodeState before,
NodeState after) |
void |
VisibleEditor.leave(NodeState before,
NodeState after) |
void |
ProgressNotificationEditor.leave(NodeState before,
NodeState after) |
void |
FailingValidator.leave(NodeState before,
NodeState after) |
void |
Editor.leave(NodeState before,
NodeState after)
Called after the given before and after states are compared.
|
void |
DefaultValidator.leave(NodeState before,
NodeState after) |
void |
DefaultEditor.leave(NodeState before,
NodeState after) |
void |
CompositeEditor.leave(NodeState before,
NodeState after) |
void |
DefaultMoveValidator.move(String name,
String sourcePath,
NodeState moved) |
static org.apache.jackrabbit.oak.api.CommitFailedException |
EditorDiff.process(Editor editor,
NodeState before,
NodeState after)
Validates and possibly edits the given subtree by diffing
and recursing through it.
|
NodeState |
ResetCommitAttributeHook.processCommit(NodeState before,
NodeState after,
CommitInfo info) |
NodeState |
EmptyHook.processCommit(NodeState before,
NodeState after,
CommitInfo info) |
NodeState |
EditorHook.processCommit(NodeState before,
NodeState after,
CommitInfo info) |
NodeState |
CompositeHook.processCommit(NodeState before,
NodeState after,
CommitInfo info) |
NodeState |
CommitHook.processCommit(NodeState before,
NodeState after,
CommitInfo info)
Validates and/or modifies the given content change before it gets
persisted.
|
| Constructor and Description |
|---|
ChangeDispatcher(NodeState root)
Create a new instance for dispatching content changes
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractNodeState
Abstract base class for
NodeState implementations. |
| Modifier and Type | Field and Description |
|---|---|
static com.google.common.base.Predicate<NodeState> |
NodeState.EXISTS
Predicate that checks the existence of NodeState instances.
|
| Modifier and Type | Method and Description |
|---|---|
NodeState |
NodeStoreBranch.getBase()
Returns the base state of this branch.
|
NodeState |
ReadOnlyBuilder.getBaseState() |
NodeState |
NodeBuilder.getBaseState()
Returns the original base state that this builder is modifying.
|
NodeState |
NodeState.getChildNode(String name)
Returns the named, possibly non-existent, child node.
|
NodeState |
NodeStoreBranch.getHead()
Returns the head state of this branch.
|
static NodeState |
NodeStateUtils.getNode(NodeState node,
String path)
Get a possibly non existing child node of a node.
|
NodeState |
ReadOnlyBuilder.getNodeState() |
NodeState |
NodeBuilder.getNodeState()
Returns an immutable node state that matches the current state of
the builder.
|
NodeState |
ChildNodeEntry.getNodeState()
The child node state
|
NodeState |
ProxyNodeStore.getRoot() |
NodeState |
NodeStore.getRoot()
Returns the latest state of the tree.
|
NodeState |
NodeStoreBranch.merge(CommitHook hook,
CommitInfo info)
Merges the changes in this branch to the main content tree.
|
NodeState |
ProxyNodeStore.merge(NodeBuilder builder,
CommitHook commitHook,
CommitInfo info) |
NodeState |
NodeStore.merge(NodeBuilder builder,
CommitHook commitHook,
CommitInfo info)
|
NodeState |
ProxyNodeStore.rebase(NodeBuilder builder) |
NodeState |
NodeStore.rebase(NodeBuilder builder)
|
NodeState |
ProxyNodeStore.reset(NodeBuilder builder) |
NodeState |
NodeStore.reset(NodeBuilder builder)
Reset the passed
builder by throwing away all its changes and
setting its base state to the current root state. |
NodeState |
ProxyNodeStore.retrieve(String checkpoint) |
NodeState |
NodeStore.retrieve(String checkpoint)
Retrieves the root node from a previously created repository checkpoint.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
ConflictAnnotatingRebaseDiff.addExistingNode(NodeBuilder builder,
String name,
NodeState before,
NodeState after) |
protected abstract void |
AbstractRebaseDiff.addExistingNode(NodeBuilder builder,
String name,
NodeState before,
NodeState after)
Called when the node
after was added on the branch but the node
exists already in the trunk. |
void |
ApplyDiff.apply(NodeState target) |
protected void |
ConflictAnnotatingRebaseDiff.changeDeletedNode(NodeBuilder builder,
String name,
NodeState after,
NodeState base) |
protected abstract void |
AbstractRebaseDiff.changeDeletedNode(NodeBuilder builder,
String name,
NodeState after,
NodeState base)
Called when the node
after was changed on the branch but was
deleted already in the trunk. |
boolean |
NodeStateDiff.childNodeAdded(String name,
NodeState after)
Called for all added child nodes.
|
MoveValidator |
MoveValidator.childNodeAdded(String name,
NodeState after) |
Validator |
MoveDetector.childNodeAdded(String name,
NodeState after) |
boolean |
EqualsDiff.childNodeAdded(String name,
NodeState after) |
boolean |
DefaultNodeStateDiff.childNodeAdded(String name,
NodeState after) |
boolean |
ApplyDiff.childNodeAdded(String name,
NodeState after) |
boolean |
AbstractRebaseDiff.childNodeAdded(String name,
NodeState after) |
boolean |
NodeStateDiff.childNodeChanged(String name,
NodeState before,
NodeState after)
Called for all child nodes that may contain changes between the before
and after states.
|
MoveValidator |
MoveValidator.childNodeChanged(String name,
NodeState before,
NodeState after) |
Validator |
MoveDetector.childNodeChanged(String name,
NodeState before,
NodeState after) |
boolean |
EqualsDiff.childNodeChanged(String name,
NodeState before,
NodeState after) |
boolean |
DefaultNodeStateDiff.childNodeChanged(String name,
NodeState before,
NodeState after) |
boolean |
ApplyDiff.childNodeChanged(String name,
NodeState before,
NodeState after) |
boolean |
AbstractRebaseDiff.childNodeChanged(String name,
NodeState before,
NodeState after) |
boolean |
NodeStateDiff.childNodeDeleted(String name,
NodeState before)
Called for all deleted child nodes.
|
MoveValidator |
MoveValidator.childNodeDeleted(String name,
NodeState before) |
Validator |
MoveDetector.childNodeDeleted(String name,
NodeState before) |
boolean |
EqualsDiff.childNodeDeleted(String name,
NodeState before) |
boolean |
DefaultNodeStateDiff.childNodeDeleted(String name,
NodeState before) |
boolean |
ApplyDiff.childNodeDeleted(String name,
NodeState before) |
boolean |
AbstractRebaseDiff.childNodeDeleted(String name,
NodeState before) |
boolean |
NodeState.compareAgainstBaseState(NodeState base,
NodeStateDiff diff)
Compares this node state against the given base state.
|
boolean |
AbstractNodeState.compareAgainstBaseState(NodeState base,
NodeStateDiff diff)
Generic default comparison algorithm that simply walks through the
property and child node lists of the given base state and compares
the entries one by one with corresponding ones (if any) in this state.
|
static boolean |
AbstractNodeState.compareAgainstBaseState(NodeState state,
NodeState base,
NodeStateDiff diff)
Generic default comparison algorithm that simply walks through the
property and child node lists of the given base state and compares
the entries one by one with corresponding ones (if any) in this state.
|
static boolean |
AbstractNodeState.comparePropertiesAgainstBaseState(NodeState state,
NodeState base,
NodeStateDiff diff)
Compares the properties of
base state with this
state. |
protected void |
ConflictAnnotatingRebaseDiff.deleteChangedNode(NodeBuilder builder,
String name,
NodeState before) |
protected abstract void |
AbstractRebaseDiff.deleteChangedNode(NodeBuilder builder,
String name,
NodeState before)
Called when the node
before was deleted in the branch but was
already changed in the trunk. |
protected void |
ConflictAnnotatingRebaseDiff.deleteDeletedNode(NodeBuilder builder,
String name,
NodeState before) |
protected abstract void |
AbstractRebaseDiff.deleteDeletedNode(NodeBuilder builder,
String name,
NodeState before)
Called when the node
before was deleted in the branch but was
already deleted in the trunk. |
void |
MoveDetector.enter(NodeState before,
NodeState after) |
static boolean |
EqualsDiff.equals(NodeState before,
NodeState after)
Diffs the given node states and returns
true if there are no
differences. |
static boolean |
AbstractNodeState.equals(NodeState a,
NodeState b) |
static boolean |
AbstractNodeState.getBoolean(NodeState state,
String name) |
static long |
AbstractNodeState.getLong(NodeState state,
String name) |
static String |
AbstractNodeState.getName(NodeState state,
String name) |
static Iterable<String> |
AbstractNodeState.getNames(NodeState state,
String name) |
static NodeState |
NodeStateUtils.getNode(NodeState node,
String path)
Get a possibly non existing child node of a node.
|
static String |
NodeStateUtils.getPrimaryTypeName(NodeState nodeState) |
static String |
AbstractNodeState.getString(NodeState state,
String name) |
static Iterable<String> |
AbstractNodeState.getStrings(NodeState state,
String name) |
void |
MoveDetector.leave(NodeState before,
NodeState after) |
static boolean |
EqualsDiff.modified(NodeState before,
NodeState after)
Diffs the given node states and returns
true if there are
differences within the properties or direct child nodes. |
void |
MoveValidator.move(String name,
String sourcePath,
NodeState moved)
Called when a moved node has been detected.
|
NodeBuilder |
ReadOnlyBuilder.setChildNode(String name,
NodeState nodeState) |
NodeBuilder |
NodeBuilder.setChildNode(String name,
NodeState nodeState)
Adds or replaces a subtree.
|
void |
NodeStoreBranch.setRoot(NodeState newRoot)
Updates the state of the content tree of this private branch.
|
static String |
NodeStateUtils.toString(NodeState node)
Provides a string representation of the given node state
|
static String |
AbstractNodeState.toString(NodeState state) |
| Constructor and Description |
|---|
ReadOnlyBuilder(NodeState state) |
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.