commit | 75af68aad9a37a2af1e688a08eb6ab3b02aaff19 | [log] [tgz] |
---|---|---|
author | Thomas Vachuska <tom@onlab.us> | Sun Feb 22 12:13:52 2015 -0800 |
committer | Gerrit Code Review <gerrit@onlab.us> | Sun Feb 22 20:41:54 2015 +0000 |
tree | ccf9c4085b82a2441aafd46416c0858a1ed90d69 | |
parent | a132e3acd3ce9f39526c18095a30c350a10d25fd [diff] [blame] |
Enhancing accumulator to allow subclasses to indicate whether they are ready for the batch to be processed. Default behaviour returns true. Change-Id: I53a3ffc3ecd75ed2607f155a61971e05a6009a66
diff --git a/utils/misc/src/main/java/org/onlab/util/Accumulator.java b/utils/misc/src/main/java/org/onlab/util/Accumulator.java index 568e38c..20b7a48 100644 --- a/utils/misc/src/main/java/org/onlab/util/Accumulator.java +++ b/utils/misc/src/main/java/org/onlab/util/Accumulator.java
@@ -40,6 +40,10 @@ */ void processItems(List<T> items); - //TODO consider a blocking version that required consumer participation - + /** + * Indicates whether the accumulator is ready to process items. + * + * @return true if ready to process + */ + boolean isReady(); }