commit | f2fda81f638a7cddf1bf64410a848f32670f386d | [log] [tgz] |
---|---|---|
author | Jonathan Hart <jono@onlab.us> | Tue Feb 17 15:21:03 2015 -0800 |
committer | Jonathan Hart <jono@onlab.us> | Wed Feb 18 00:27:18 2015 +0000 |
tree | b4471c8bdbd323ee0e8386d606d451c2101e7a0c | |
parent | 64689559d76f0efd63df65ab5cf06aa0b4322116 [diff] [blame] |
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)) {