Class Ref<T>

java.lang.Object
io.datarouter.scanner.Ref<T>
All Implemented Interfaces:
Supplier<T>

public class Ref<T> extends Object implements Supplier<T>
Lightweight alternative to AtomicReference for storing a mutable reference.
  • Constructor Details

    • Ref

      public Ref(T ref)
  • Method Details

    • set

      public T set(T ref)
    • get

      public T get()
      Specified by:
      get in interface Supplier<T>