Implementation of IdBlockStore on top of AtomicCounter
Change-Id: I019322a812262edeca20a55813183a63b4525b75
diff --git a/core/api/src/main/java/org/onosproject/store/service/AtomicCounter.java b/core/api/src/main/java/org/onosproject/store/service/AtomicCounter.java
index 4385ce0..1b71b5a 100644
--- a/core/api/src/main/java/org/onosproject/store/service/AtomicCounter.java
+++ b/core/api/src/main/java/org/onosproject/store/service/AtomicCounter.java
@@ -28,6 +28,29 @@
long incrementAndGet();
/**
+ * Atomically increment by one the current value.
+ *
+ * @return previous value
+ */
+ long getAndIncrement();
+
+ /**
+ * Atomically adds the given value to the current value.
+ *
+ * @param delta the value to add
+ * @return previous value
+ */
+ long getAndAdd(long delta);
+
+ /**
+ * Atomically adds the given value to the current value.
+ *
+ * @param delta the value to add
+ * @return updated value
+ */
+ long addAndGet(long delta);
+
+ /**
* Returns the current value of the counter without modifying it.
*
* @return current value