Package se.michaelthelin.spotify
Class SpotifyApiThreading
java.lang.Object
se.michaelthelin.spotify.SpotifyApiThreading
Threading utilities for the Spotify API.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ExecutorServiceThe thread pool used for async execution. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> CompletableFuture<T> executeAsync(Callable<T> callable) Execute a callable asynchronously.
-
Field Details
-
THREAD_POOL
The thread pool used for async execution.
-
-
Constructor Details
-
SpotifyApiThreading
public SpotifyApiThreading()Default constructor.
-
-
Method Details
-
executeAsync
Execute a callable asynchronously.- Type Parameters:
T- The return type.- Parameters:
callable- The callable to execute.- Returns:
- A CompletableFuture for the result.
-