Refactor IdBlcok: move to core.util package
Change-Id: Ibe0b3fe82d851a6549e33af1e4dc675f47a814b8
diff --git a/src/main/java/net/onrc/onos/core/intent/runtime/PersistIntent.java b/src/main/java/net/onrc/onos/core/intent/runtime/PersistIntent.java
index 14a0534..0e280ee 100644
--- a/src/main/java/net/onrc/onos/core/intent/runtime/PersistIntent.java
+++ b/src/main/java/net/onrc/onos/core/intent/runtime/PersistIntent.java
@@ -11,7 +11,7 @@
import net.onrc.onos.core.datastore.ObjectExistsException;
import net.onrc.onos.core.intent.IntentOperationList;
import net.onrc.onos.core.registry.IControllerRegistryService;
-import net.onrc.onos.core.registry.IdBlock;
+import net.onrc.onos.core.util.IdBlock;
import net.onrc.onos.core.util.serializers.KryoFactory;
import org.slf4j.Logger;
diff --git a/src/main/java/net/onrc/onos/core/newintent/IdBlockAllocatorBasedIntentIdGenerator.java b/src/main/java/net/onrc/onos/core/newintent/IdBlockAllocatorBasedIntentIdGenerator.java
index 9f2eceb..2099697 100644
--- a/src/main/java/net/onrc/onos/core/newintent/IdBlockAllocatorBasedIntentIdGenerator.java
+++ b/src/main/java/net/onrc/onos/core/newintent/IdBlockAllocatorBasedIntentIdGenerator.java
@@ -2,7 +2,7 @@
import net.onrc.onos.api.newintent.IntentId;
import net.onrc.onos.api.newintent.IntentIdGenerator;
-import net.onrc.onos.core.registry.IdBlock;
+import net.onrc.onos.core.util.IdBlock;
import net.onrc.onos.core.util.UnavailableIdException;
import net.onrc.onos.core.util.IdBlockAllocator;
diff --git a/src/main/java/net/onrc/onos/core/registry/StandaloneRegistry.java b/src/main/java/net/onrc/onos/core/registry/StandaloneRegistry.java
index bf5612c..8683a50 100644
--- a/src/main/java/net/onrc/onos/core/registry/StandaloneRegistry.java
+++ b/src/main/java/net/onrc/onos/core/registry/StandaloneRegistry.java
@@ -15,6 +15,7 @@
import net.floodlightcontroller.core.module.IFloodlightService;
import net.floodlightcontroller.restserver.IRestApiService;
import net.onrc.onos.core.registry.web.RegistryWebRoutable;
+import net.onrc.onos.core.util.IdBlock;
import net.onrc.onos.core.util.OnosInstanceId;
import org.apache.commons.lang.NotImplementedException;
diff --git a/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java b/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java
index 5bff0e8..78f60b8 100644
--- a/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java
+++ b/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java
@@ -22,6 +22,7 @@
import net.floodlightcontroller.core.module.IFloodlightService;
import net.floodlightcontroller.restserver.IRestApiService;
import net.onrc.onos.core.registry.web.RegistryWebRoutable;
+import net.onrc.onos.core.util.IdBlock;
import net.onrc.onos.core.util.OnosInstanceId;
import org.apache.commons.lang.NotImplementedException;
diff --git a/src/main/java/net/onrc/onos/core/registry/IdBlock.java b/src/main/java/net/onrc/onos/core/util/IdBlock.java
similarity index 96%
rename from src/main/java/net/onrc/onos/core/registry/IdBlock.java
rename to src/main/java/net/onrc/onos/core/util/IdBlock.java
index 53048e4..1d544f6 100644
--- a/src/main/java/net/onrc/onos/core/registry/IdBlock.java
+++ b/src/main/java/net/onrc/onos/core/util/IdBlock.java
@@ -1,7 +1,6 @@
-package net.onrc.onos.core.registry;
+package net.onrc.onos.core.util;
import com.google.common.base.Objects;
-import net.onrc.onos.core.util.UnavailableIdException;
import static com.google.common.base.Preconditions.checkArgument;
diff --git a/src/main/java/net/onrc/onos/core/util/IdBlockAllocator.java b/src/main/java/net/onrc/onos/core/util/IdBlockAllocator.java
index 3c38205..bc60470 100644
--- a/src/main/java/net/onrc/onos/core/util/IdBlockAllocator.java
+++ b/src/main/java/net/onrc/onos/core/util/IdBlockAllocator.java
@@ -1,7 +1,5 @@
package net.onrc.onos.core.util;
-import net.onrc.onos.core.registry.IdBlock;
-
/**
* An interface that gives unique ID spaces.
*/
diff --git a/src/test/java/net/onrc/onos/core/newintent/IdBlockAllocatorBasedIntentIdGeneratorTest.java b/src/test/java/net/onrc/onos/core/newintent/IdBlockAllocatorBasedIntentIdGeneratorTest.java
index 97394bd..b1aa1e2 100644
--- a/src/test/java/net/onrc/onos/core/newintent/IdBlockAllocatorBasedIntentIdGeneratorTest.java
+++ b/src/test/java/net/onrc/onos/core/newintent/IdBlockAllocatorBasedIntentIdGeneratorTest.java
@@ -1,7 +1,7 @@
package net.onrc.onos.core.newintent;
import net.onrc.onos.api.newintent.IntentId;
-import net.onrc.onos.core.registry.IdBlock;
+import net.onrc.onos.core.util.IdBlock;
import net.onrc.onos.core.util.IdBlockAllocator;
import org.junit.Before;
import org.junit.Test;
diff --git a/src/test/java/net/onrc/onos/core/registry/StandaloneRegistryTest.java b/src/test/java/net/onrc/onos/core/registry/StandaloneRegistryTest.java
index 79cc0e8..d57c3aa 100644
--- a/src/test/java/net/onrc/onos/core/registry/StandaloneRegistryTest.java
+++ b/src/test/java/net/onrc/onos/core/registry/StandaloneRegistryTest.java
@@ -18,6 +18,7 @@
import net.floodlightcontroller.core.module.FloodlightModuleContext;
import net.onrc.onos.core.registry.IControllerRegistryService.ControlChangeCallback;
+import net.onrc.onos.core.util.IdBlock;
import net.onrc.onos.core.util.OnosInstanceId;
import org.junit.After;
diff --git a/src/test/java/net/onrc/onos/core/registry/ZookeeperRegistryTest.java b/src/test/java/net/onrc/onos/core/registry/ZookeeperRegistryTest.java
index b13993b..e6e4e72 100644
--- a/src/test/java/net/onrc/onos/core/registry/ZookeeperRegistryTest.java
+++ b/src/test/java/net/onrc/onos/core/registry/ZookeeperRegistryTest.java
@@ -9,6 +9,7 @@
import net.floodlightcontroller.test.FloodlightTestCase;
import net.onrc.onos.core.registry.StandaloneRegistryTest.LoggingCallback;
import net.onrc.onos.core.registry.ZookeeperRegistry.SwitchLeaderListener;
+import net.onrc.onos.core.util.IdBlock;
import net.onrc.onos.core.util.OnosInstanceId;
import org.apache.curator.RetryPolicy;
diff --git a/src/test/java/net/onrc/onos/core/registry/IdBlockTest.java b/src/test/java/net/onrc/onos/core/util/IdBlockTest.java
similarity index 89%
rename from src/test/java/net/onrc/onos/core/registry/IdBlockTest.java
rename to src/test/java/net/onrc/onos/core/util/IdBlockTest.java
index aec55fa..ce6f3ea 100644
--- a/src/test/java/net/onrc/onos/core/registry/IdBlockTest.java
+++ b/src/test/java/net/onrc/onos/core/util/IdBlockTest.java
@@ -1,6 +1,5 @@
-package net.onrc.onos.core.registry;
+package net.onrc.onos.core.util;
-import net.onrc.onos.core.util.UnavailableIdException;
import org.junit.Test;
import static org.hamcrest.Matchers.is;