Module io.github.bucket4j.core
Interface ExecutionStrategy
public interface ExecutionStrategy
Defines the strategy for request execution.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ExecutionStrategyThis execution strategy always communicates with backend in current thread -
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutionStrategybackground(Executor executor) This execution strategy always communicates with backend in specified executorstatic ExecutionStrategybackgroundTimeBounded(Executor executor, Duration timeout) This execution strategy always communicates with backend in specified executor<T> T<T> CompletableFuture<T>executeAsync(Supplier<CompletableFuture<T>> supplier)
-
Field Details
-
SAME_TREAD
This execution strategy always communicates with backend in current thread
-
-
Method Details
-
execute
-
executeAsync
-
background
This execution strategy always communicates with backend in specified executor -
backgroundTimeBounded
This execution strategy always communicates with backend in specified executor
-