Class Infrastructure

java.lang.Object
io.smallrye.mutiny.infrastructure.Infrastructure

public class Infrastructure extends Object
  • Method Details

    • reload

      public static void reload()
    • setDefaultExecutor

      public static void setDefaultExecutor()
      Configure or reset the executors.
    • setDefaultExecutor

      public static void setDefaultExecutor(Executor s)
      Changes the default executor, and shuts the previous executor down.
      Parameters:
      s - the new executor
    • setDefaultExecutor

      public static void setDefaultExecutor(Executor executor, boolean shutdownPrevious)
      Changes the default executor, and shuts the previous executor down when shutdownPrevious is true.
      Parameters:
      executor - the new executor
      shutdownPrevious - true when the previous executor needs to be shut down, false otherwise
    • getDefaultWorkerPool

      public static ScheduledExecutorService getDefaultWorkerPool()
    • getDefaultExecutor

      public static Executor getDefaultExecutor()
    • onUniCreation

      public static <T> Uni<T> onUniCreation(Uni<T> instance)
    • onMultiCreation

      public static <T> Multi<T> onMultiCreation(Multi<T> instance)
    • onUniSubscription

      public static <T> UniSubscriber<? super T> onUniSubscription(Uni<T> instance, UniSubscriber<? super T> subscriber)
    • onMultiSubscription

      public static <T> Flow.Subscriber<? super T> onMultiSubscription(Flow.Publisher<? extends T> instance, Flow.Subscriber<? super T> subscriber)
    • decorate

      public static <T> Supplier<T> decorate(Supplier<T> supplier)
    • decorate

      public static <T> Consumer<T> decorate(Consumer<T> consumer)
    • decorate

      public static LongConsumer decorate(LongConsumer consumer)
    • decorate

      public static Runnable decorate(Runnable runnable)
    • decorate

      public static <V> Callable<V> decorate(Callable<V> callable)
    • decorate

      public static <T1, T2> BiConsumer<T1,T2> decorate(BiConsumer<T1,T2> consumer)
    • decorate

      public static <I1, I2, I3, O> Functions.Function3<I1,I2,I3,O> decorate(Functions.Function3<I1,I2,I3,O> function)
    • decorate

      public static <I1, I2, I3, I4, O> Functions.Function4<I1,I2,I3,I4,O> decorate(Functions.Function4<I1,I2,I3,I4,O> function)
    • decorate

      public static <I1, I2, I3, I4, I5, O> Functions.Function5<I1,I2,I3,I4,I5,O> decorate(Functions.Function5<I1,I2,I3,I4,I5,O> function)
    • decorate

      public static <I1, I2, I3, I4, I5, I6, O> Functions.Function6<I1,I2,I3,I4,I5,I6,O> decorate(Functions.Function6<I1,I2,I3,I4,I5,I6,O> function)
    • decorate

      public static <I1, I2, I3, I4, I5, I6, I7, O> Functions.Function7<I1,I2,I3,I4,I5,I6,I7,O> decorate(Functions.Function7<I1,I2,I3,I4,I5,I6,I7,O> function)
    • decorate

      public static <I1, I2, I3, I4, I5, I6, I7, I8, O> Functions.Function8<I1,I2,I3,I4,I5,I6,I7,I8,O> decorate(Functions.Function8<I1,I2,I3,I4,I5,I6,I7,I8,O> function)
    • decorate

      public static <I1, I2, I3, I4, I5, I6, I7, I8, I9, O> Functions.Function9<I1,I2,I3,I4,I5,I6,I7,I8,I9,O> decorate(Functions.Function9<I1,I2,I3,I4,I5,I6,I7,I8,I9,O> function)
    • decorate

      public static <I, O> Function<I,O> decorate(Function<I,O> function)
    • decorate

      public static <I1, I2, O> BiFunction<I1,I2,O> decorate(BiFunction<I1,I2,O> function)
    • decorate

      public static <T> BinaryOperator<T> decorate(BinaryOperator<T> operator)
    • decorate

      public static <T1, T2, T3> Functions.TriConsumer<T1,T2,T3> decorate(Functions.TriConsumer<T1,T2,T3> consumer)
    • setCompletableFutureWrapper

      public static void setCompletableFutureWrapper(UnaryOperator<CompletableFuture<?>> wrapper)
    • wrapCompletableFuture

      public static <T> CompletableFuture<T> wrapCompletableFuture(CompletableFuture<T> future)
    • handleDroppedException

      public static void handleDroppedException(Throwable throwable)
    • setCanCallerThreadBeBlockedSupplier

      public static void setCanCallerThreadBeBlockedSupplier(BooleanSupplier supplier)
      Defines a custom caller thread blocking check supplier.
      Parameters:
      supplier - the supplier, must not be null and must not throw an exception or it will also be lost.
    • canCallerThreadBeBlocked

      public static boolean canCallerThreadBeBlocked()
    • setDroppedExceptionHandler

      public static void setDroppedExceptionHandler(Consumer<Throwable> handler)
      Defines a custom dropped exception handler.
      Parameters:
      handler - the handler, must not be null and must not throw an exception or it will also be lost.
    • reloadUniInterceptors

      public static void reloadUniInterceptors()
    • reloadMultiInterceptors

      public static void reloadMultiInterceptors()
    • reloadCallbackDecorators

      public static void reloadCallbackDecorators()
    • clearInterceptors

      public static void clearInterceptors()
    • resetDroppedExceptionHandler

      public static void resetDroppedExceptionHandler()
    • resetCanCallerThreadBeBlockedSupplier

      public static void resetCanCallerThreadBeBlockedSupplier()
    • decorate

      public static BooleanSupplier decorate(BooleanSupplier supplier)
    • decorate

      public static <T> Predicate<T> decorate(Predicate<T> predicate)
    • logFromOperator

      public static void logFromOperator(String identifier, String event, Object value, Throwable failure)
      Log from an operator.

      This method should never be called directly but only from Multi.log(String) and Uni.log(String).

      Parameters:
      identifier - the event identifier
      event - the event as a string
      value - the value, if any or null
      failure - the failure, if any or null
    • setOperatorLogger

      public static void setOperatorLogger(Infrastructure.OperatorLogger operatorLogger)
      Defines operator logging behavior for Multi.log(String) and Uni.log(String).
      Parameters:
      operatorLogger - the new operator logger
    • resetOperatorLogger

      public static void resetOperatorLogger()
    • getMultiOverflowDefaultBufferSize

      public static int getMultiOverflowDefaultBufferSize()
      Get the default overflow buffer size for MultiOverflowStrategy.buffer().
      Returns:
      the default value
    • setMultiOverflowDefaultBufferSize

      public static void setMultiOverflowDefaultBufferSize(int size)
      Sets the default overflow buffer size for MultiOverflowStrategy.buffer().
      Parameters:
      size - the buffer size, must be strictly positive
    • getBufferSizeXs

      public static int getBufferSizeXs()
      Get the xs buffer size (for internal usage).
      Returns:
      the buffer size
    • setBufferSizeXs

      public static void setBufferSizeXs(int size)
      Set the xs buffer size (for internal usage).
      Parameters:
      size - the buffer size
    • getBufferSizeS

      public static int getBufferSizeS()
      Get the s buffer size (for internal usage).
      Returns:
      the buffer size
    • setBufferSizeS

      public static void setBufferSizeS(int size)
      Set the s buffer size (for internal usage).
      Parameters:
      size - the buffer size