APIs for accessing/administering storage partitions + API for creating distributed primitives

Change-Id: I54ec3a76fdbdd09a57d283a8bd041a05d6e362c5
diff --git a/core/api/src/main/java/org/onosproject/store/primitives/DistributedPrimitiveCreator.java b/core/api/src/main/java/org/onosproject/store/primitives/DistributedPrimitiveCreator.java
new file mode 100644
index 0000000..fd38d24
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/store/primitives/DistributedPrimitiveCreator.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2016 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.store.primitives;
+
+import org.onosproject.store.service.AsyncAtomicCounter;
+import org.onosproject.store.service.AsyncAtomicValue;
+import org.onosproject.store.service.AsyncConsistentMap;
+import org.onosproject.store.service.AsyncDistributedSet;
+import org.onosproject.store.service.DistributedQueue;
+import org.onosproject.store.service.Serializer;
+
+/**
+ * Interface for entity that can create instances of different distributed primitives.
+ */
+public interface DistributedPrimitiveCreator {
+
+    /**
+     * Creates a new {@code AsyncConsistentMap}.
+     *
+     * @param name map name
+     * @param serializer serializer to use for serializing/deserializing map entries
+     * @param <K> key type
+     * @param <V> value type
+     * @return map
+     */
+    <K, V> AsyncConsistentMap<K, V> newAsyncConsistentMap(String name, Serializer serializer);
+
+    /**
+     * Creates a new {@code AsyncAtomicCounter}.
+     *
+     * @param name counter name
+     * @return counter
+     */
+    AsyncAtomicCounter newAsyncCounter(String name);
+
+    /**
+     * Creates a new {@code AsyncAtomicValue}.
+     *
+     * @param name value name
+     * @param serializer serializer to use for serializing/deserializing value type
+     * @param <V> value type
+     * @return value
+     */
+    <V> AsyncAtomicValue<V> newAsyncAtomicValue(String name, Serializer serializer);
+
+    /**
+     * Creates a new {@code DistributedQueue}.
+     *
+     * @param name queue name
+     * @param serializer serializer to use for serializing/deserializing queue entries
+     * @param <E> queue entry type
+     * @return queue
+     */
+    <E> DistributedQueue<E> newDistributedQueue(String name, Serializer serializer);
+
+    /**
+     * Creates a new {@code AsyncDistributedSet}.
+     *
+     * @param name set name
+     * @param serializer serializer to use for serializing/deserializing set entries
+     * @param <E> set entry type
+     * @return set
+     */
+    <E> AsyncDistributedSet<E> newAsyncDistributedSet(String name, Serializer serializer);
+}
\ No newline at end of file