Interface IMonitor<V>

  • All Superinterfaces:
    IProducer<V>
    All Known Implementing Classes:
    Monitor

    public interface IMonitor<V>
    extends IProducer<V>
    • Method Detail

      • getValue

        V getValue()
      • setValueIfGreater

        IMonitor<V> setValueIfGreater​(V value,
                                      org.symphonyoss.s2.fugue.core.trace.ITraceContext trace)
      • setValue

        IMonitor<V> setValue​(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.