Class FaultToleranceContext<V>

java.lang.Object
io.smallrye.faulttolerance.core.FaultToleranceContext<V>

public final class FaultToleranceContext<V> extends Object
  • Constructor Details

    • FaultToleranceContext

      public FaultToleranceContext(Supplier<Future<V>> delegate, boolean isAsync)
  • Method Details

    • call

      public Future<V> call()
    • isAsync

      public boolean isAsync()
      Whether the guarded operation is truly asynchronous (that is, returns a CompletionStage of the result, or some other asynchronous type).
    • isSync

      public boolean isSync()
      Whether the guarded operation is synchronous. This includes pseudo-asynchronous operations (that return a Future of the result).
    • set

      public <T> void set(Class<T> clazz, T object)
    • remove

      public <T> T remove(Class<T> clazz)
    • has

      public boolean has(Class<?> clazz)
    • get

      public <T> T get(Class<T> clazz)
    • get

      public <T> T get(Class<T> clazz, T defaultValue)
    • registerEventHandler

      public <E extends FaultToleranceEvent> void registerEventHandler(Class<E> eventType, Consumer<E> handler)
    • fireEvent

      public <E extends FaultToleranceEvent> void fireEvent(E event)