Class MigrationExecution

  • public class MigrationExecution
    extends java.lang.Object
    This class is used to control the execution mechanism for migrations.

    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.

    • Method Detail

      • Serial

        public static MigrationExecution Serial​(@NotNull
                                                MigrationSerialOrder order)
        Construct a serial execution with the specified ordering.
        order - The serial execution order fixed/random.
        an execution instance
      • Parallel

        public static MigrationExecution Parallel()
        Constructs a parallel execution.
        an execution instance
      • getMode

        public MigrationExecutionMode getMode()
        Get the current execution mode.
        The execution mode.
      • getOrder

        public java.util.Optional<MigrationSerialOrder> getOrder()
        If the execution mode is MigrationExecutionMode.SERIAL, then this will contain an execution order. If the mode is not SERIAL, then this will return an empty optional.
        The optional execution mode.
      • toString

        public java.lang.String toString()
        A string representation of the migration execution. The return value from this function should only be used for logging or human-read identification. It should not be used programmatically and will not follow semver.
        toString in class java.lang.Object
        A string representation of the string.