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
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.spongepowered.configurate.reactive.Publisher

    Publisher.Cached<V>
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    Get the last cached value.
    void
    submit(V value)
    Directly submit a value to be the current cached value.

    Methods inherited from interface org.spongepowered.configurate.reactive.Publisher

    cache, cache, executor, hasSubscribers, map, subscribe
  • Method Details

    • 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