Interface Publisher.Cached<V>

  • Type Parameters:
    V - value type
    All Superinterfaces:
    Publisher<V>
    Enclosing interface:
    Publisher<V>

    public static interface Publisher.Cached<V>
    extends Publisher<V>
    A publisher that caches the last value received.
    Since:
    4.0.0
    • Method Detail

      • get

        V get()
        Get the last cached value.
        Returns:
        latest cached value
        Since:
        4.0.0
      • submit

        void submit​(V value)
        Directly submit a value to be the current cached value.

        This will be passed on to downstream subscribers.

        Parameters:
        value - new value
        Since:
        4.0.0