public class ManuallyTriggeredDirectExecutor extends Object implements Executor
This executor can be used in concurrent tests to control when certain asynchronous actions should happen.
Constructor and Description |
---|
ManuallyTriggeredDirectExecutor() |
Modifier and Type | Method and Description |
---|---|
void |
execute(Runnable command) |
int |
numQueuedRunnables()
Gets the number of Runnables currently queued.
|
void |
trigger()
Triggers the next queued runnable and executes it synchronously.
|
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.