Class OrderedExecutor
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.tools.OrderedExecutor
-
public class OrderedExecutor extends java.lang.ObjectWrapper for executor services which ensures that tasks with the same key are processed in order.
-
-
Constructor Summary
Constructors Constructor Description OrderedExecutor(java.util.concurrent.ExecutorService delegateService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.Future<java.lang.Void>submit(java.lang.Object orderingKey, java.lang.Runnable runnable)<T> java.util.concurrent.Future<T>submit(java.lang.Object orderingKey, java.util.concurrent.Callable<T> callable)
-
-
-
Method Detail
-
submit
public java.util.concurrent.Future<java.lang.Void> submit(java.lang.Object orderingKey, java.lang.Runnable runnable)- Parameters:
orderingKey- Key for the ordering channelrunnable- Runnable to submit to the executor service- Returns:
- Future for the task
-
submit
public <T> java.util.concurrent.Future<T> submit(java.lang.Object orderingKey, java.util.concurrent.Callable<T> callable)- Parameters:
orderingKey- Key for the ordering channelcallable- Callable to submit to the executor service- Returns:
- Future for the task
-
-