public abstract class AbstractQueuedExecutionThreadService<E>
extends com.google.common.util.concurrent.AbstractExecutionThreadService
AbstractQueuedExecutionThreadService that allows actions of type Eto be queued and executed in the order received.
| Constructor and Description |
|---|
AbstractQueuedExecutionThreadService(boolean failOnError) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
beforeShutDown() |
protected abstract void |
execute(E action) |
protected boolean |
hasFailed() |
protected boolean |
isAsync()
Allow service to run non-asynchronously to allow unit testing of concrete implementations, without needing to
deal with timing issues.
|
protected void |
postShutDown() |
protected void |
queue(E action) |
protected void |
run() |
protected void |
shutDown() |
public AbstractQueuedExecutionThreadService(boolean failOnError)
protected abstract void execute(E action) throws java.lang.Exception
java.lang.Exceptionprotected final void run()
throws java.lang.Exception
run in class com.google.common.util.concurrent.AbstractExecutionThreadServicejava.lang.Exceptionprotected final boolean hasFailed()
protected final void shutDown()
throws java.lang.Exception
shutDown in class com.google.common.util.concurrent.AbstractExecutionThreadServicejava.lang.Exceptionprotected void beforeShutDown()
throws java.lang.Exception
java.lang.Exceptionprotected void postShutDown()
throws java.lang.Exception
java.lang.Exceptionprotected final void queue(E action)
protected boolean isAsync()