V - document tree value type@NotThreadSafe public interface AsyncDocumentTree<V> extends DistributedPrimitive, Transactional<NodeUpdate<V>>
DistributedPrimitive.Status, DistributedPrimitive.TypeDEFAULT_OPERATION_TIMEOUT_MILLIS, DEFAULT_OPERTATION_TIMEOUT_MILLIS| Modifier and Type | Method and Description | 
|---|---|
| java.util.concurrent.CompletableFuture<java.lang.Void> | addListener(DocumentPath path,
           DocumentTreeListener<V> listener)Registers a listener to be notified when the subtree rooted at the specified path
 is modified. | 
| default java.util.concurrent.CompletableFuture<java.lang.Void> | addListener(DocumentTreeListener<V> listener)Registers a listener to be notified when the tree is modified. | 
| default DocumentTree<V> | asDocumentTree()Returns a new  DocumentTreethat is backed by this instance. | 
| default DocumentTree<V> | asDocumentTree(long timeoutMillis)Returns a new  DocumentTreethat is backed by this instance. | 
| java.util.concurrent.CompletableFuture<java.lang.Boolean> | create(DocumentPath path,
      V value)Creates a document tree node if one does not exist already. | 
| java.util.concurrent.CompletableFuture<java.lang.Boolean> | createRecursive(DocumentPath path,
               V value)Creates a document tree node recursively by creating all missing intermediate nodes in the path. | 
| java.util.concurrent.CompletableFuture<Versioned<V>> | get(DocumentPath path)Returns the value of the tree node at specified path. | 
| java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,Versioned<V>>> | getChildren(DocumentPath path)Returns the children of node at specified path in the form of a mapping from child name to child value. | 
| default DistributedPrimitive.Type | primitiveType()Returns the type of primitive. | 
| java.util.concurrent.CompletableFuture<java.lang.Void> | removeListener(DocumentTreeListener<V> listener)Unregisters a previously added listener. | 
| java.util.concurrent.CompletableFuture<Versioned<V>> | removeNode(DocumentPath path)Removes the node with the specified path. | 
| java.util.concurrent.CompletableFuture<java.lang.Boolean> | replace(DocumentPath path,
       V newValue,
       long version)Conditionally updates a tree node if the current version matches a specified version. | 
| java.util.concurrent.CompletableFuture<java.lang.Boolean> | replace(DocumentPath path,
       V newValue,
       V currentValue)Conditionally updates a tree node if the current node value matches a specified version. | 
| DocumentPath | root()Returns the  pathto root of the tree. | 
| java.util.concurrent.CompletableFuture<Versioned<V>> | set(DocumentPath path,
   V value)Creates or updates a document tree node. | 
addStatusChangeListener, applicationId, destroy, name, removeStatusChangeListener, statusChangeListenersbegin, commit, prepare, prepareAndCommit, rollbackdefault DistributedPrimitive.Type primitiveType()
DistributedPrimitiveprimitiveType in interface DistributedPrimitiveDocumentPath root()
path to root of the tree.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,Versioned<V>>> getChildren(DocumentPath path)
path - path to the nodeNoSuchDocumentPathException - if the path does not point to a valid nodejava.util.concurrent.CompletableFuture<Versioned<V>> get(DocumentPath path)
path - path to the nodeversioned value
 or null if path does not point to a valid nodejava.util.concurrent.CompletableFuture<Versioned<V>> set(DocumentPath path, V value)
path - path to the nodevalue - value to be associated with the node (null is a valid value)versioned
 value or null if there was no node previously at that path.
 Future will be completed with a IllegalDocumentModificationException
 if the parent node (for the node to create/update) does not existjava.util.concurrent.CompletableFuture<java.lang.Boolean> create(DocumentPath path, V value)
path - path to the nodevalue - the non-null value to be associated with the nodetrue if the new node was successfully
 created. Future will be completed with false if a node already exists at the specified path.
 Future will be completed exceptionally with a IllegalDocumentModificationException if the parent
 node (for the node to create) does not existjava.util.concurrent.CompletableFuture<java.lang.Boolean> createRecursive(DocumentPath path, V value)
path - path to the nodevalue - value to be associated with the node (null is a valid value)true if the new node was successfully
 created. Future will be completed with false if a node already exists at the specified pathjava.util.concurrent.CompletableFuture<java.lang.Boolean> replace(DocumentPath path, V newValue, long version)
path - path to the nodenewValue - value to associate with the node (null is a valid value)version - current version of the node for update to occurtrue if the update was made
 or false if update did not happenjava.util.concurrent.CompletableFuture<java.lang.Boolean> replace(DocumentPath path, V newValue, V currentValue)
path - path to the nodenewValue - value to associate with the node (null is a valid value)currentValue - current value of the node for update to occurtrue if the update was made
 or false if update did not happenjava.util.concurrent.CompletableFuture<Versioned<V>> removeNode(DocumentPath path)
path - path to the nodeIllegalDocumentModificationException if the node to be removed is either the root
 node or has one or more children. Future will be completed with a
 NoSuchDocumentPathException if the node to be removed does not existjava.util.concurrent.CompletableFuture<java.lang.Void> addListener(DocumentPath path, DocumentTreeListener<V> listener)
path - path to the nodelistener - listener to be notifiedjava.util.concurrent.CompletableFuture<java.lang.Void> removeListener(DocumentTreeListener<V> listener)
listener - listener to unregisterdefault java.util.concurrent.CompletableFuture<java.lang.Void> addListener(DocumentTreeListener<V> listener)
listener - listener to be notifieddefault DocumentTree<V> asDocumentTree()
DocumentTree that is backed by this instance.DocumentTree instancedefault DocumentTree<V> asDocumentTree(long timeoutMillis)
DocumentTree that is backed by this instance.timeoutMillis - timeout duration for the returned DocumentTree operationsDocumentTree instance