public class MigrationExecution
extends java.lang.Object
Read operations may be executed in parallel, sequentially in a fixed order, or sequentially in a randomized order.
This class facilitates correct combinations of parallel/serial with random/fixed.
Modifier and Type | Method and Description |
---|---|
MigrationExecutionMode |
getMode()
Get the current execution mode.
|
java.util.Optional<MigrationSerialOrder> |
getOrder()
If the execution mode is
MigrationExecutionMode.SERIAL , then this will contain an execution order. |
static MigrationExecution |
Parallel()
Constructs a parallel execution.
|
static MigrationExecution |
Serial(MigrationSerialOrder order)
Construct a serial execution with the specified ordering.
|
java.lang.String |
toString()
A string representation of the migration execution.
|
public static MigrationExecution Serial(@NotNull MigrationSerialOrder order)
order
- The serial execution order fixed/random.public static MigrationExecution Parallel()
public MigrationExecutionMode getMode()
public java.util.Optional<MigrationSerialOrder> getOrder()
MigrationExecutionMode.SERIAL
, then this will contain an execution order.
If the mode is not SERIAL, then this will return an empty optional.public java.lang.String toString()
toString
in class java.lang.Object