| Package | Description |
|---|---|
| io.atomix.core.tree |
Distributed tree primitive interfaces.
|
| Modifier and Type | Field and Description |
|---|---|
static DocumentPath |
DocumentPath.ROOT
Root document tree path.
|
| Modifier and Type | Method and Description |
|---|---|
DocumentPath |
DocumentPath.childPath()
Returns the relative path to the given node.
|
static DocumentPath |
DocumentPath.from(List<String> elements)
Creates a new
DocumentPath from a list of path elements. |
static DocumentPath |
DocumentPath.from(List<String> elements,
String child)
Creates a new
DocumentPath from a list of path elements. |
static DocumentPath |
DocumentPath.from(String... elements)
Creates a new
DocumentPath from a list of path elements. |
static DocumentPath |
DocumentPath.from(String path)
Creates a new
DocumentPath from a period delimited path string. |
static DocumentPath |
DocumentPath.leastCommonAncestor(Collection<DocumentPath> paths)
Returns the path that points to the least common ancestor of the specified
collection of paths.
|
DocumentPath |
DocumentPath.parent()
Returns a path for the parent of this node.
|
DocumentPath |
DocumentTreeEvent.path()
Returns the path to the changed node.
|
DocumentPath |
DocumentTreeNode.path()
Returns the path to this node in a
DocumentTree. |
DocumentPath |
AsyncAtomicDocumentTree.root()
Returns the
path to root of the tree. |
DocumentPath |
AtomicDocumentTree.root()
Returns the
path to root of the tree. |
| Modifier and Type | Method and Description |
|---|---|
default CompletableFuture<Void> |
AsyncAtomicDocumentTree.addListener(DocumentPath path,
DocumentTreeEventListener<V> listener)
Registers a listener to be notified when the subtree rooted at the specified path
is modified.
|
void |
AtomicDocumentTree.addListener(DocumentPath path,
DocumentTreeEventListener<V> listener)
Registers a listener to be notified when a subtree rooted at the specified path
is modified.
|
CompletableFuture<Void> |
AsyncAtomicDocumentTree.addListener(DocumentPath path,
DocumentTreeEventListener<V> listener,
Executor executor)
Registers a listener to be notified when the subtree rooted at the specified path
is modified.
|
int |
DocumentPath.compareTo(DocumentPath that) |
CompletableFuture<Boolean> |
AsyncAtomicDocumentTree.create(DocumentPath path,
V value)
Creates a document tree node if one does not exist already.
|
boolean |
AtomicDocumentTree.create(DocumentPath path,
V value)
Creates a document tree node if one does not exist already.
|
CompletableFuture<Boolean> |
AsyncAtomicDocumentTree.createRecursive(DocumentPath path,
V value)
Creates a document tree node recursively by creating all missing intermediate nodes in the path.
|
boolean |
AtomicDocumentTree.createRecursive(DocumentPath path,
V value)
Creates a document tree node by first creating any missing intermediate nodes in the path.
|
CompletableFuture<Versioned<V>> |
AsyncAtomicDocumentTree.get(DocumentPath path)
Returns the value of the tree node at specified path.
|
Versioned<V> |
AtomicDocumentTree.get(DocumentPath path)
Returns a document tree node.
|
CompletableFuture<Map<String,Versioned<V>>> |
AsyncAtomicDocumentTree.getChildren(DocumentPath path)
Returns the children of node at specified path in the form of a mapping from child name to child value.
|
Map<String,Versioned<V>> |
AtomicDocumentTree.getChildren(DocumentPath path)
Returns the child values for this node.
|
boolean |
DocumentPath.isAncestorOf(DocumentPath other)
Returns if the specified path belongs to a direct ancestor of the node pointed at by this path.
|
boolean |
DocumentPath.isDescendentOf(DocumentPath other)
Returns if the specified path is belongs to a subtree rooted this path.
|
CompletableFuture<Versioned<V>> |
AsyncAtomicDocumentTree.removeNode(DocumentPath path)
Removes the node with the specified path.
|
Versioned<V> |
AtomicDocumentTree.removeNode(DocumentPath path)
Removes the node with the specified path.
|
CompletableFuture<Boolean> |
AsyncAtomicDocumentTree.replace(DocumentPath path,
V newValue,
long version)
Conditionally updates a tree node if the current version matches a specified version.
|
boolean |
AtomicDocumentTree.replace(DocumentPath path,
V newValue,
long version)
Conditionally updates a tree node if the current version matches a specified version.
|
CompletableFuture<Boolean> |
AsyncAtomicDocumentTree.replace(DocumentPath path,
V newValue,
V currentValue)
Conditionally updates a tree node if the current node value matches a specified version.
|
boolean |
AtomicDocumentTree.replace(DocumentPath path,
V newValue,
V currentValue)
Conditionally updates a tree node if the current value matches a specified value.
|
CompletableFuture<Versioned<V>> |
AsyncAtomicDocumentTree.set(DocumentPath path,
V value)
Creates or updates a document tree node.
|
Versioned<V> |
AtomicDocumentTree.set(DocumentPath path,
V value)
Creates or updates a document tree node.
|
| Modifier and Type | Method and Description |
|---|---|
static DocumentPath |
DocumentPath.leastCommonAncestor(Collection<DocumentPath> paths)
Returns the path that points to the least common ancestor of the specified
collection of paths.
|
| Constructor and Description |
|---|
DocumentPath(String nodeName,
DocumentPath parentPath)
Constructs a new document path.
|
DocumentTreeEvent(DocumentTreeEvent.Type type,
DocumentPath path,
Optional<Versioned<V>> newValue,
Optional<Versioned<V>> oldValue)
Constructs a new
DocumentTreeEvent. |
Copyright © 2013–2018. All rights reserved.