Interface DataTreeSnapshot
- All Known Subinterfaces:
CursorAwareDataTreeModification
,CursorAwareDataTreeSnapshot
,DataTreeModification
public interface DataTreeSnapshot
Read-only snapshot of a
DataTree
. The snapshot is stable and isolated, e.g. data tree changes occurring after
the snapshot has been taken are not visible through the snapshot.-
Method Summary
Modifier and TypeMethodDescription@NonNull EffectiveModelContext
Return theEffectiveModelContext
effective at the time this snapshot was taken.@NonNull DataTreeModification
Create a new data tree modification based on this snapshot, using the specified data application strategy.Read a particular node from the snapshot.Read theVersionInfo
of the last commit which modified a particular node.
-
Method Details
-
modelContext
@NonNull EffectiveModelContext modelContext()Return theEffectiveModelContext
effective at the time this snapshot was taken.- Returns:
- the
EffectiveModelContext
effective at the time this snapshot was taken
-
readNode
Read a particular node from the snapshot.- Parameters:
path
- Path of the node- Returns:
- Optional result encapsulating the presence and value of the node
-
readVersionInfo
Read theVersionInfo
of the last commit which modified a particular node.- Parameters:
path
- Path of the node- Returns:
- Optional
VersionInfo
from the commit
-
newModification
@NonNull DataTreeModification newModification()Create a new data tree modification based on this snapshot, using the specified data application strategy.- Returns:
- A new data tree modification
-