Automatically rebalance intent key partitions on cluster change.

Also sorted output of leaders command by leader IP.

Change-Id: Ie85896a4f6f50489ebd7994c905808ce34fca94c
diff --git a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/PartitionId.java b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/PartitionId.java
index 1ed2e4f..885361f 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/PartitionId.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/PartitionId.java
@@ -24,17 +24,26 @@
  * processed by a single ONOS instance at a time.
  */
 public class PartitionId {
-    private final long id;
+    private final int id;
 
     /**
      * Creates a new partition ID.
      *
      * @param id the partition ID
      */
-    PartitionId(long id) {
+    PartitionId(int id) {
         this.id = id;
     }
 
+    /**
+     * Returns the integer ID value.
+     *
+     * @return ID value
+     */
+    public int value() {
+        return id;
+    }
+
     @Override
     public boolean equals(Object o) {
         if (!(o instanceof PartitionId)) {