- All Implemented Interfaces:
- Direct Known Subclasses:
public abstract class AbstractSubmitterExecutor extends java.lang.Object implements SubmitterExecutorSince the conversion to a
SubmitterExecutorfrom an executor is often the same (just using the
ListenableFutureTaskto wrap the task). This class provides an easy way to create a
SubmitterExecutor. Take a look at
SubmitterExecutorAdapterfor an easy example of how this is used. In general this wont be useful outside of Threadly developers, but must be a public visibility since it is used in sub-packages.
If you do find yourself using this class, please post an issue on github to tell us why. If there is something you want our schedulers to provide, we are happy to hear about it.
Constructors Constructor Description
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
submit(java.lang.Runnable task, T result)Submit a task to run as soon as possible.
submit(java.util.concurrent.Callable<T> task)Submit a
Callableto run as soon as possible.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void execute(java.lang.Runnable task)
- Specified by:
public <T> ListenableFuture<T> submit(java.lang.Runnable task, T result)Description copied from interface:
SubmitterExecutorSubmit a task to run as soon as possible. The
Future.get()method will return the provided result once the runnable has completed.
public <T> ListenableFuture<T> submit(java.util.concurrent.Callable<T> task)Description copied from interface:
Callableto run as soon as possible. This is needed when a result needs to be consumed from the callable.