K - The key typeV - The value typepublic class Monitor<K,V extends Comparable<V>> extends SynchronousProducer<V> implements IMonitor<V>
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(boolean initialize,
IConsumer<V> listener)
Add the given listener and optionally call back immediately with the
current value.
|
V |
getValue() |
Monitor<K,V> |
setValue(V value) |
Monitor<K,V> |
setValueIfGreater(V value) |
addListener, notify, produce, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, removeListenerpublic Monitor(V value)
public Monitor<K,V> setValueIfGreater(V value)
setValueIfGreater in interface IMonitor<V extends Comparable<V>>public Monitor<K,V> setValue(V value)
setValue in interface IMonitor<V extends Comparable<V>>public void addListener(boolean initialize,
IConsumer<V> listener)
IMonitoraddListener in interface IMonitor<V extends Comparable<V>>initialize - If true then call the listener with the current value.listener - A listener which will be called whenever the value
of this monitor changes.Copyright © 2018 Symphony Software Foundation. All rights reserved.