DistributedLinkResourceStore
Change-Id: Ia45c221946693906c12d64f20f25e30786a04224
Showing
4 changed files
with
8 additions
and
3 deletions
| ... | @@ -17,6 +17,7 @@ package org.onlab.onos.net.resource; | ... | @@ -17,6 +17,7 @@ package org.onlab.onos.net.resource; |
| 17 | 17 | ||
| 18 | import java.util.Objects; | 18 | import java.util.Objects; |
| 19 | 19 | ||
| 20 | +// FIXME: Document what is the unit? Mbps? | ||
| 20 | /** | 21 | /** |
| 21 | * Representation of bandwidth resource. | 22 | * Representation of bandwidth resource. |
| 22 | */ | 23 | */ | ... | ... |
| ... | @@ -49,6 +49,10 @@ public final class BatchWriteRequest { | ... | @@ -49,6 +49,10 @@ public final class BatchWriteRequest { |
| 49 | .toString(); | 49 | .toString(); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | + public static Builder newBuilder() { | ||
| 53 | + return new Builder(); | ||
| 54 | + } | ||
| 55 | + | ||
| 52 | /** | 56 | /** |
| 53 | * Builder for BatchWriteRequest. | 57 | * Builder for BatchWriteRequest. |
| 54 | */ | 58 | */ | ... | ... |
| ... | @@ -64,13 +64,13 @@ public class WriteRequest { | ... | @@ -64,13 +64,13 @@ public class WriteRequest { |
| 64 | * | 64 | * |
| 65 | * @param tableName name of the table | 65 | * @param tableName name of the table |
| 66 | * @param key key in the table | 66 | * @param key key in the table |
| 67 | - * @param newValue value to write, must not be null | ||
| 68 | * @param oldValue previous value expected, must not be null | 67 | * @param oldValue previous value expected, must not be null |
| 68 | + * @param newValue value to write, must not be null | ||
| 69 | * @return WriteRequest | 69 | * @return WriteRequest |
| 70 | */ | 70 | */ |
| 71 | public static WriteRequest putIfValueMatches(String tableName, String key, | 71 | public static WriteRequest putIfValueMatches(String tableName, String key, |
| 72 | - byte[] newValue, | 72 | + byte[] oldValue, |
| 73 | - byte[] oldValue) { | 73 | + byte[] newValue) { |
| 74 | return new WriteRequest(PUT_IF_VALUE, tableName, key, | 74 | return new WriteRequest(PUT_IF_VALUE, tableName, key, |
| 75 | checkNotNull(newValue), ANY_VERSION, | 75 | checkNotNull(newValue), ANY_VERSION, |
| 76 | checkNotNull(oldValue)); | 76 | checkNotNull(oldValue)); | ... | ... |
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment