Class AtomixDocumentTree<V>

  • All Implemented Interfaces:
    org.onosproject.store.service.AsyncDocumentTree<V>, org.onosproject.store.service.DistributedPrimitive, org.onosproject.store.service.Transactional<org.onosproject.store.primitives.NodeUpdate<V>>

    public class AtomixDocumentTree<V>
    extends java.lang.Object
    implements org.onosproject.store.service.AsyncDocumentTree<V>
    Atomix document tree.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.onosproject.store.service.DistributedPrimitive

        org.onosproject.store.service.DistributedPrimitive.Status, org.onosproject.store.service.DistributedPrimitive.Type
    • Field Summary

      • Fields inherited from interface org.onosproject.store.service.DistributedPrimitive

        DEFAULT_OPERATION_TIMEOUT_MILLIS
    • Constructor Summary

      Constructors 
      Constructor Description
      AtomixDocumentTree​(io.atomix.core.tree.AsyncAtomicDocumentTree<V> atomixTree)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<java.lang.Void> addListener​(org.onosproject.store.service.DocumentPath path, org.onosproject.store.service.DocumentTreeListener<V> listener)  
      java.util.concurrent.CompletableFuture<org.onosproject.store.service.Version> begin​(org.onosproject.store.primitives.TransactionId transactionId)  
      java.util.concurrent.CompletableFuture<java.lang.Void> commit​(org.onosproject.store.primitives.TransactionId transactionId)  
      java.util.concurrent.CompletableFuture<java.lang.Boolean> create​(org.onosproject.store.service.DocumentPath path, V value)  
      java.util.concurrent.CompletableFuture<java.lang.Boolean> createRecursive​(org.onosproject.store.service.DocumentPath path, V value)  
      java.util.concurrent.CompletableFuture<java.lang.Void> destroy()  
      java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> get​(org.onosproject.store.service.DocumentPath path)  
      java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​org.onosproject.store.service.Versioned<V>>> getChildren​(org.onosproject.store.service.DocumentPath path)  
      java.lang.String name()  
      java.util.concurrent.CompletableFuture<java.lang.Boolean> prepare​(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.NodeUpdate<V>> transactionLog)  
      java.util.concurrent.CompletableFuture<java.lang.Boolean> prepareAndCommit​(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.NodeUpdate<V>> transactionLog)  
      java.util.concurrent.CompletableFuture<java.lang.Void> removeListener​(org.onosproject.store.service.DocumentTreeListener<V> listener)  
      java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> removeNode​(org.onosproject.store.service.DocumentPath path)  
      java.util.concurrent.CompletableFuture<java.lang.Boolean> replace​(org.onosproject.store.service.DocumentPath path, V newValue, long version)  
      java.util.concurrent.CompletableFuture<java.lang.Boolean> replace​(org.onosproject.store.service.DocumentPath path, V newValue, V currentValue)  
      java.util.concurrent.CompletableFuture<java.lang.Void> rollback​(org.onosproject.store.primitives.TransactionId transactionId)  
      org.onosproject.store.service.DocumentPath root()  
      java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> set​(org.onosproject.store.service.DocumentPath path, V value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.onosproject.store.service.AsyncDocumentTree

        addListener, asDocumentTree, asDocumentTree, primitiveType
      • Methods inherited from interface org.onosproject.store.service.DistributedPrimitive

        addStatusChangeListener, applicationId, removeStatusChangeListener, statusChangeListeners
    • Constructor Detail

      • AtomixDocumentTree

        public AtomixDocumentTree​(io.atomix.core.tree.AsyncAtomicDocumentTree<V> atomixTree)
    • Method Detail

      • name

        public java.lang.String name()
        Specified by:
        name in interface org.onosproject.store.service.DistributedPrimitive
      • root

        public org.onosproject.store.service.DocumentPath root()
        Specified by:
        root in interface org.onosproject.store.service.AsyncDocumentTree<V>
      • getChildren

        public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​org.onosproject.store.service.Versioned<V>>> getChildren​(org.onosproject.store.service.DocumentPath path)
        Specified by:
        getChildren in interface org.onosproject.store.service.AsyncDocumentTree<V>
      • get

        public java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> get​(org.onosproject.store.service.DocumentPath path)
        Specified by:
        get in interface org.onosproject.store.service.AsyncDocumentTree<V>
      • set

        public java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> set​(org.onosproject.store.service.DocumentPath path,
                                                                                                      V value)
        Specified by:
        set in interface org.onosproject.store.service.AsyncDocumentTree<V>
      • create

        public java.util.concurrent.CompletableFuture<java.lang.Boolean> create​(org.onosproject.store.service.DocumentPath path,
                                                                                V value)
        Specified by:
        create in interface org.onosproject.store.service.AsyncDocumentTree<V>
      • createRecursive

        public java.util.concurrent.CompletableFuture<java.lang.Boolean> createRecursive​(org.onosproject.store.service.DocumentPath path,
                                                                                         V value)
        Specified by:
        createRecursive in interface org.onosproject.store.service.AsyncDocumentTree<V>
      • replace

        public java.util.concurrent.CompletableFuture<java.lang.Boolean> replace​(org.onosproject.store.service.DocumentPath path,
                                                                                 V newValue,
                                                                                 long version)
        Specified by:
        replace in interface org.onosproject.store.service.AsyncDocumentTree<V>
      • replace

        public java.util.concurrent.CompletableFuture<java.lang.Boolean> replace​(org.onosproject.store.service.DocumentPath path,
                                                                                 V newValue,
                                                                                 V currentValue)
        Specified by:
        replace in interface org.onosproject.store.service.AsyncDocumentTree<V>
      • removeNode

        public java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> removeNode​(org.onosproject.store.service.DocumentPath path)
        Specified by:
        removeNode in interface org.onosproject.store.service.AsyncDocumentTree<V>
      • addListener

        public java.util.concurrent.CompletableFuture<java.lang.Void> addListener​(org.onosproject.store.service.DocumentPath path,
                                                                                  org.onosproject.store.service.DocumentTreeListener<V> listener)
        Specified by:
        addListener in interface org.onosproject.store.service.AsyncDocumentTree<V>
      • removeListener

        public java.util.concurrent.CompletableFuture<java.lang.Void> removeListener​(org.onosproject.store.service.DocumentTreeListener<V> listener)
        Specified by:
        removeListener in interface org.onosproject.store.service.AsyncDocumentTree<V>
      • begin

        public java.util.concurrent.CompletableFuture<org.onosproject.store.service.Version> begin​(org.onosproject.store.primitives.TransactionId transactionId)
        Specified by:
        begin in interface org.onosproject.store.service.Transactional<V>
      • prepare

        public java.util.concurrent.CompletableFuture<java.lang.Boolean> prepare​(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.NodeUpdate<V>> transactionLog)
        Specified by:
        prepare in interface org.onosproject.store.service.Transactional<V>
      • prepareAndCommit

        public java.util.concurrent.CompletableFuture<java.lang.Boolean> prepareAndCommit​(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.NodeUpdate<V>> transactionLog)
        Specified by:
        prepareAndCommit in interface org.onosproject.store.service.Transactional<V>
      • commit

        public java.util.concurrent.CompletableFuture<java.lang.Void> commit​(org.onosproject.store.primitives.TransactionId transactionId)
        Specified by:
        commit in interface org.onosproject.store.service.Transactional<V>
      • rollback

        public java.util.concurrent.CompletableFuture<java.lang.Void> rollback​(org.onosproject.store.primitives.TransactionId transactionId)
        Specified by:
        rollback in interface org.onosproject.store.service.Transactional<V>
      • destroy

        public java.util.concurrent.CompletableFuture<java.lang.Void> destroy()
        Specified by:
        destroy in interface org.onosproject.store.service.DistributedPrimitive