commit | efb75110ee3a77a7ae579ca9b28eb36b6ca58f08 | [log] [tgz] |
---|---|---|
author | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Fri May 13 15:24:34 2016 -0700 |
committer | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Fri May 13 15:24:34 2016 -0700 |
tree | e0fa6a927cc9e9f1dde0eba1cd1e8f4959ac4a93 | |
parent | 0a07c079d4a8f5ee9f68bc8c8cf0363df21b8b6c [diff] [blame] |
Move the resource allocation details into ContinuousResourceAllocation Change-Id: If5b6a86c92f27cc7acf65e6e397f72afd3a4cb41
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/TransactionalContinuousResourceStore.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/TransactionalContinuousResourceStore.java index 34478f6..9279e99 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/TransactionalContinuousResourceStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/TransactionalContinuousResourceStore.java
@@ -156,11 +156,7 @@ return true; } - ContinuousResourceAllocation newValue = new ContinuousResourceAllocation(original, - ImmutableList.<ResourceAllocation>builder() - .addAll(oldValue.allocations()) - .add(value) - .build()); + ContinuousResourceAllocation newValue = oldValue.allocate(original, value); return consumers.replace(original.id(), oldValue, newValue); }