Class SpotifyApiThreading

java.lang.Object
se.michaelthelin.spotify.SpotifyApiThreading

public class SpotifyApiThreading extends Object
Threading utilities for the Spotify API.
  • Field Details

    • THREAD_POOL

      public static final ExecutorService THREAD_POOL
      The thread pool used for async execution.
  • Constructor Details

    • SpotifyApiThreading

      public SpotifyApiThreading()
      Default constructor.
  • Method Details

    • executeAsync

      public static <T> CompletableFuture<T> executeAsync(Callable<T> callable)
      Execute a callable asynchronously.
      Type Parameters:
      T - The return type.
      Parameters:
      callable - The callable to execute.
      Returns:
      A CompletableFuture for the result.