Class ProcessMessageSubscriptionSentTimeMigration

java.lang.Object
io.camunda.zeebe.engine.state.migration.ProcessMessageSubscriptionSentTimeMigration
All Implemented Interfaces:
MigrationTask

public class ProcessMessageSubscriptionSentTimeMigration extends Object implements MigrationTask
Migrates pending process message subscriptions by adding them to PendingProcessMessageSubscriptionState and removing them from ZbColumnFamilies.PROCESS_SUBSCRIPTION_BY_SENT_TIME.
  • Constructor Details

    • ProcessMessageSubscriptionSentTimeMigration

      public ProcessMessageSubscriptionSentTimeMigration()
  • Method Details

    • getIdentifier

      public String getIdentifier()
      Description copied from interface: MigrationTask
      Returns identifier for the migration task.

      The identifier is used for logging.

      In the future, it might also be used to store the migrations that were run in persistent state

      Specified by:
      getIdentifier in interface MigrationTask
      Returns:
      identifier for the migration task
    • needsToRun

      public boolean needsToRun(ProcessingState processingState)
      Description copied from interface: MigrationTask
      Returns whether the migration needs to run. By default this returns true. We keep track of whether migrations have already run, and we use this to determine if they need to run. There are migrations from before this mechanism was implemented. Because of this we need to make sure they still have the opportunity to decide if they need to run in the old way.
      Specified by:
      needsToRun in interface MigrationTask
      Parameters:
      processingState - the immutable Zeebe state
      Returns:
      whether the migration needs to run
    • runMigration

      public void runMigration(MutableProcessingState processingState)
      Description copied from interface: MigrationTask
      Implementations of this method perform the actual migration
      Specified by:
      runMigration in interface MigrationTask
      Parameters:
      processingState - the mutable Zeebe state