public class ExecutionQueue
extends java.lang.Object
Runnable
s and executes them in serial on an
ExecutorService
.Modifier and Type | Class and Description |
---|---|
class |
ExecutionQueue.ThrowableCatchingRunnable |
Constructor and Description |
---|
ExecutionQueue(java.util.concurrent.ExecutorService service,
MDCUtils.MDCDetails logDetails) |
ExecutionQueue(java.util.concurrent.ExecutorService service,
MDCUtils.MDCDetails logDetails,
java.lang.String identId) |
Modifier and Type | Method and Description |
---|---|
void |
beginTransaction()
If multiple commands must be put on the queue in an atomic manner, use this to begin a transaction.
|
void |
closeTransaction() |
void |
pause()
Pause execution of queued
Runnable s. |
void |
resume()
Resume execution of queued
Runnable s. |
void |
submit(java.lang.Runnable runnable)
Submit a
Runnable to be executed. |
void |
submit(java.lang.Runnable runnable,
java.lang.String logMsg) |
public ExecutionQueue(java.util.concurrent.ExecutorService service, MDCUtils.MDCDetails logDetails)
public ExecutionQueue(java.util.concurrent.ExecutorService service, MDCUtils.MDCDetails logDetails, java.lang.String identId)
public void beginTransaction()
public void closeTransaction()
public void submit(java.lang.Runnable runnable)
Runnable
to be executed.runnable
- the Runnable
to be executed.public void submit(java.lang.Runnable runnable, java.lang.String logMsg)
public void pause()
Runnable
s.public void resume()
Runnable
s.