Extract common ID generation logic using IdBlockAllocator

- Define IdGenerator<T> interface
- Implement AbstractIdBlockAllocatorBasedIdGenerator<T>, which
  has the common logic for the existing IntentId, FlowId, MatchActionId,
  and MatchActionOperationsId generator implementations.

Change-Id: I7aeea249df1710719760ed477bffe62853577e0f
diff --git a/src/main/java/net/onrc/onos/core/util/IdGenerator.java b/src/main/java/net/onrc/onos/core/util/IdGenerator.java
new file mode 100644
index 0000000..b735954
--- /dev/null
+++ b/src/main/java/net/onrc/onos/core/util/IdGenerator.java
@@ -0,0 +1,21 @@
+package net.onrc.onos.core.util;
+
+/**
+ * A generalized interface for ID generation
+ *
+ * {@link #getNewId()} generates a globally unique ID instance on
+ * each invocation.
+ *
+ * @param <T> the type of ID
+ */
+// TODO: do we need to define a base marker interface for ID,
+// then changed the type parameter to <T extends BaseId> something
+// like that?
+public interface IdGenerator<T> {
+    /**
+     * Returns a globally unique ID instance.
+     *
+     * @return globally unique ID instance
+     */
+    T getNewId();
+}