Class Effect

java.lang.Object
org.jsignal.rx.Effect
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
SideEffect

public class Effect extends Object implements Runnable
  • Field Details

    • context

      public static final Context<Optional<Effect>> context
    • nextId

      protected static final AtomicInteger nextId
    • thread

      protected final Thread thread
    • id

      protected final int id
    • effect

      protected final Runnable effect
    • cleanups

      protected final Cleanups cleanups
    • provider

      protected final Provider provider
    • inbound

      protected final LinkedHashSet<Signal<?>> inbound
    • outbound

      protected final Set<Signal<?>> outbound
    • disposed

      protected boolean disposed
  • Constructor Details

  • Method Details

    • getThread

      public Thread getThread()
    • onTrack

      public void onTrack(Signal<?> signal)
      This method should only be called inside of implementations of Signal.track()
    • onUntrack

      public void onUntrack(Signal<?> signal)
      This method should only be called inside of implementations of Signal.untrack()
    • getId

      public int getId()
    • dispose

      public void dispose()
    • isDisposed

      public boolean isDisposed()
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • getInbound

      public Collection<Signal<?>> getInbound()
    • getOutbound

      public Collection<Signal<?>> getOutbound()
    • getCleanups

      public Cleanups getCleanups()
    • run

      protected void run(Runnable inner)
    • clear

      protected void clear()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • nextId

      public static int nextId()
    • create

      public static Effect create(Runnable runnable)
    • create

      public static Effect create(Runnable runnable, Set<Signal<?>> outbound)