Interface Action<E extends Exception>

All Superinterfaces:
Dependency<Void>
All Known Subinterfaces:
DependantAction<E>
All Known Implementing Classes:
ValueActionImpl

public interface Action<E extends Exception> extends Dependency<Void>
  • Method Details

    • apply

      void apply()
    • isSatisfied

      default boolean isSatisfied()
      Specified by:
      isSatisfied in interface Dependency<E extends Exception>
    • get

      default Void get()
      Specified by:
      get in interface Dependency<E extends Exception>
    • successful

      boolean successful()
    • canApply

      boolean canApply()
      Returns true if action can be applied. Return false if action application of action failed with exception, which is non-retryable.
    • fail

      void fail(Exception e) throws E
      Parameters:
      e - Exception which occurred during call of apply()
      Throws:
      E - If action specific exception if failed critically and all computation should be stopped.
    • error

      Optional<E> error()