T - the type stored in the collectorpublic class LatestValueCollector<T> extends Object implements Collector<T,T>
| Constructor and Description |
|---|
LatestValueCollector() |
| Modifier and Type | Method and Description |
|---|---|
T |
readValue()
Calculates, if needed, and then returns the value for this function.
|
void |
setChangeNotification(Runnable notification)
Task to run to notify of the presence of a new value in the collector.
|
void |
writeValue(T newValue)
Takes the value and consumes it.
|
public void writeValue(T newValue)
WriteFunctionwriteValue in interface WriteFunction<T>newValue - a valuepublic T readValue()
ReadFunctionreadValue in interface ReadFunction<T>public void setChangeNotification(Runnable notification)
CollectorsetChangeNotification in interface Collector<T,T>notification - callback for the notificationCopyright © 2015. All rights reserved.