Class TBase

java.lang.Object
one.tranic.t.base.TBase

public class TBase extends Object
  • Field Details

    • executor

      public static final Executor executor
  • Constructor Details

    • TBase

      public TBase()
  • Method Details

    • console

      public static Operator console()
    • runAsync

      public static CompletableFuture<Void> runAsync(Runnable runnable)
      Executes the given Runnable asynchronously using a pre-configured executor.
      Parameters:
      runnable - the Runnable task to be executed asynchronously
      Returns:
      a CompletableFuture<Void> that completes once the specified task has been executed
    • runAsync

      public static <T> CompletableFuture<T> runAsync(Supplier<T> supplier)
      Executes the given supplier asynchronously using a pre-configured executor.

      This method is intended for running tasks that return a result in an asynchronous manner.

      Type Parameters:
      T - the type of the result produced by the supplier
      Parameters:
      supplier - the Supplier task to be executed asynchronously
      Returns:
      a CompletableFuture<T> that completes with the result of the supplier execution