Create an implementaion of IntentIdGenerator

- Define interface to allocate IdBlock in IdBlockAllocator
- Implement IdBlockAllocatorBasedIntentIdGenerator
- Refactor IdBlock class

Change-Id: I21fa21ae625e3d7e137a7f846bb5a0c1bdb8df9a
diff --git a/src/main/java/net/onrc/onos/core/registry/IControllerRegistryService.java b/src/main/java/net/onrc/onos/core/registry/IControllerRegistryService.java
index ef441db..7d41a4e 100644
--- a/src/main/java/net/onrc/onos/core/registry/IControllerRegistryService.java
+++ b/src/main/java/net/onrc/onos/core/registry/IControllerRegistryService.java
@@ -5,6 +5,7 @@
 import java.util.Map;
 
 import net.floodlightcontroller.core.module.IFloodlightService;
+import net.onrc.onos.core.util.IdBlockAllocator;
 import net.onrc.onos.core.util.OnosInstanceId;
 
 /**
@@ -21,7 +22,7 @@
  * mechanism that enables them to decide who should control a each switch. The
  * registry service provides this mechanism.
  */
-public interface IControllerRegistryService extends IFloodlightService {
+public interface IControllerRegistryService extends IFloodlightService, IdBlockAllocator {
 
     /**
      * Callback interface for control change events.
@@ -133,21 +134,6 @@
     public Collection<Long> getSwitchesControlledByController(String controllerId);
 
     /**
-     * Get a unique Id Block.
-     *
-     * @return Id Block.
-     */
-    public IdBlock allocateUniqueIdBlock();
-
-    /**
-     * Get next unique id and retrieve a new range of ids if needed.
-     *
-     * @param range range to use for the identifier
-     * @return Id Block.
-     */
-    public IdBlock allocateUniqueIdBlock(long range);
-
-    /**
      * Get a globally unique ID.
      *
      * @return a globally unique ID.