Class SegmentNodeBuilder
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder
-
- org.apache.jackrabbit.oak.segment.SegmentNodeBuilder
-
- All Implemented Interfaces:
NodeBuilder
public class SegmentNodeBuilder extends MemoryNodeBuilder
A node builder that keeps track of the number of updates (set property calls and so on). If there are too many updates, getNodeState() is called, which will write the records to the segment, and that might persist the changes (if the segment is flushed).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Blob
createBlob(java.io.InputStream stream)
protected MemoryNodeBuilder
createChildBuilder(java.lang.String name)
Factory method for creating new child state builders.@NotNull SegmentNodeState
getNodeState()
Returns an immutable node state that matches the current state of the builder.protected void
updated()
Called whenever this node is modified, i.e.-
Methods inherited from class org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder
annotateSourcePath, child, exists, getBaseState, getBoolean, getChildNode, getChildNodeCount, getChildNodeNames, getName, getName, getNames, getParent, getPath, getProperties, getProperty, getPropertyCount, getString, hasChildNode, hasProperty, isModified, isNew, isNew, isReplaced, isReplaced, isRoot, moveTo, remove, removeProperty, reset, set, setChildNode, setChildNode, setProperty, setProperty, setProperty, toString
-
-
-
-
Method Detail
-
updated
protected void updated()
Description copied from class:MemoryNodeBuilder
Called whenever this node is modified, i.e. a property is added, changed or removed, or a child node is added or removed. Changes inside child nodes or the subtrees below are not reported. The default implementation triggers anMemoryNodeBuilder.updated()
call on the root builder (unless this is already the root builder), which subclasses can use to capture aggregate update information across the whole tree.- Overrides:
updated
in classMemoryNodeBuilder
-
getNodeState
@NotNull public @NotNull SegmentNodeState getNodeState()
Description copied from interface:NodeBuilder
Returns an immutable node state that matches the current state of the builder.- Specified by:
getNodeState
in interfaceNodeBuilder
- Overrides:
getNodeState
in classMemoryNodeBuilder
- Returns:
- immutable node state
-
createChildBuilder
protected MemoryNodeBuilder createChildBuilder(java.lang.String name)
Description copied from class:MemoryNodeBuilder
Factory method for creating new child state builders. Subclasses may override this method to control the behavior of child state builders.- Overrides:
createChildBuilder
in classMemoryNodeBuilder
- Returns:
- new builder
-
createBlob
public Blob createBlob(java.io.InputStream stream) throws java.io.IOException
- Specified by:
createBlob
in interfaceNodeBuilder
- Overrides:
createBlob
in classMemoryNodeBuilder
- Throws:
java.io.IOException
-
-