Interface IMonitor<V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddListener(org.symphonyoss.s2.fugue.pipeline.IConsumer<V> listener, org.symphonyoss.s2.fugue.core.trace.ITraceContext trace)Add the given listener and optionally call back immediately with the current value.VgetValue()IMonitor<V>setValue(V value, org.symphonyoss.s2.fugue.core.trace.ITraceContext trace)IMonitor<V>setValueIfGreater(V value, org.symphonyoss.s2.fugue.core.trace.ITraceContext trace)-
Methods inherited from interface org.symphonyoss.s2.canon.runtime.IProducer
addListener, removeListener
-
-
-
-
Method Detail
-
getValue
V getValue()
-
setValueIfGreater
IMonitor<V> setValueIfGreater(V value, org.symphonyoss.s2.fugue.core.trace.ITraceContext trace)
-
addListener
void addListener(org.symphonyoss.s2.fugue.pipeline.IConsumer<V> listener, org.symphonyoss.s2.fugue.core.trace.ITraceContext trace)
Add the given listener and optionally call back immediately with the current value.- Parameters:
listener- A listener which will be called whenever the value of this monitor changes.trace- If non-null then call the listener with the current value and the given trace context.
-
-