public final class AsyncExecutor extends Object
| Constructor and Description |
|---|
AsyncExecutor() |
AsyncExecutor(int queueCapacity) |
AsyncExecutor(String name) |
AsyncExecutor(String name,
int queueCapacity) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(AsyncTask task) |
String |
getName() |
void |
start()
Start the AsyncExecutor with a default queue capacity.
|
void |
stop()
Stop the AsyncExecutor and discard any pending tasks in the queue.
|
long |
stop(long timeoutMillis)
Stop the AsyncExecutor within
timeoutMillis milliseconds and
discard any pending tasks in the queue. |
public AsyncExecutor()
public AsyncExecutor(int queueCapacity)
public AsyncExecutor(String name)
public AsyncExecutor(String name, int queueCapacity)
public void start()
public void stop()
public long stop(long timeoutMillis)
timeoutMillis milliseconds and
discard any pending tasks in the queue. This method has no effect if the
executor is already stopped.timeoutMillis - the maximum time to wait for shutdown (in milliseconds)public void execute(AsyncTask task)
public String getName()
Copyright © 2021. All rights reserved.