Package one.tranic.t.base
Class TBase
java.lang.Object
one.tranic.t.base.TBase
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Operatorconsole()static CompletableFuture<Void> Executes the givenRunnableasynchronously using a pre-configured executor.static <T> CompletableFuture<T> Executes the given supplier asynchronously using a pre-configured executor.
-
Field Details
-
executor
-
-
Constructor Details
-
TBase
public TBase()
-
-
Method Details
-
console
-
runAsync
Executes the givenRunnableasynchronously using a pre-configured executor.- Parameters:
runnable- theRunnabletask to be executed asynchronously- Returns:
- a
CompletableFuture<Void>that completes once the specified task has been executed
-
runAsync
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- theSuppliertask to be executed asynchronously- Returns:
- a
CompletableFuture<T>that completes with the result of the supplier execution
-