Implement destroy() method for certain primitives to preserve backwards compatibility

Change-Id: I64e5790d531bf538bbfd886419362b14967331e6
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixAtomicValue.java b/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixAtomicValue.java
index 0843f9c..48c524a 100644
--- a/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixAtomicValue.java
+++ b/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixAtomicValue.java
@@ -81,4 +81,9 @@
         }
         return CompletableFuture.completedFuture(null);
     }
+
+    @Override
+    public CompletableFuture<Void> destroy() {
+        return adaptFuture(atomixValue.delete());
+    }
 }
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixDocumentTree.java b/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixDocumentTree.java
index 206da04..b191356 100644
--- a/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixDocumentTree.java
+++ b/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixDocumentTree.java
@@ -145,6 +145,11 @@
         throw new UnsupportedOperationException();
     }
 
+    @Override
+    public CompletableFuture<Void> destroy() {
+        return adaptTreeFuture(atomixTree.delete());
+    }
+
     private DocumentPath toOnosPath(io.atomix.core.tree.DocumentPath path) {
         List<String> pathElements = Lists.newArrayList(path.pathElements());
         pathElements.set(0, DocumentPath.ROOT.pathElements().get(0));
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixWorkQueue.java b/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixWorkQueue.java
index 9125b4d..89ffd4c 100644
--- a/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixWorkQueue.java
+++ b/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixWorkQueue.java
@@ -80,4 +80,9 @@
                 .withTotalPending(stats.totalPending())
                 .build());
     }
+
+    @Override
+    public CompletableFuture<Void> destroy() {
+        return adaptFuture(atomixWorkQueue.delete());
+    }
 }