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 BlobcreateBlob(InputStream stream)protected MemoryNodeBuildercreateChildBuilder(String name)Factory method for creating new child state builders.@NotNull SegmentNodeStategetNodeState()Returns an immutable node state that matches the current state of the builder.protected voidupdated()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:MemoryNodeBuilderCalled 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:
updatedin classMemoryNodeBuilder
-
getNodeState
@NotNull public @NotNull SegmentNodeState getNodeState()
Description copied from interface:NodeBuilderReturns an immutable node state that matches the current state of the builder.- Specified by:
getNodeStatein interfaceNodeBuilder- Overrides:
getNodeStatein classMemoryNodeBuilder- Returns:
- immutable node state
-
createChildBuilder
protected MemoryNodeBuilder createChildBuilder(String name)
Description copied from class:MemoryNodeBuilderFactory method for creating new child state builders. Subclasses may override this method to control the behavior of child state builders.- Overrides:
createChildBuilderin classMemoryNodeBuilder- Returns:
- new builder
-
createBlob
public Blob createBlob(InputStream stream) throws IOException
- Specified by:
createBlobin interfaceNodeBuilder- Overrides:
createBlobin classMemoryNodeBuilder- Throws:
IOException
-
-