public class ParallelTransactionExecutor extends Object
Constructor and Description |
---|
ParallelTransactionExecutor(String tenantId,
String tenantHost)
Instantiates a parallel transaction executor with as many workers as there are available
processors.
|
ParallelTransactionExecutor(String tenantId,
String tenantHost,
int numWorkers)
Instantiates a parallel transaction executor with the specified number of workers.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Runnable command)
Adds a command to the queue of commands to run in a transaction.
|
void |
add(Runnable command,
int priority)
Adds a command to the queue of commands to run in a transaction with the specified priority.
|
void |
run()
Runs the commands in parallel transactions and wait for completion.
|
public ParallelTransactionExecutor(String tenantId, String tenantHost)
public void add(Runnable command)
command
- public void add(Runnable command, int priority)
command
- priority
- public void run()