Class SherlockMigratorBuilder

java.lang.Object
com.coditory.sherlock.rxjava.migrator.SherlockMigratorBuilder

public final class SherlockMigratorBuilder extends Object
  • Method Details

    • setMigrationId

      @NotNull public @NotNull SherlockMigratorBuilder setMigrationId(@NotNull @NotNull String migrationId)
    • addChangeSet

      @NotNull public @NotNull SherlockMigratorBuilder addChangeSet(@NotNull @NotNull String changeSetId, @NotNull @NotNull Runnable changeSet)
      Adds change set to migration process.
      Parameters:
      changeSetId - unique change set id used. This is used as a lock id in migration process.
      changeSet - change set action that should be run if change set was not already applied
      Returns:
      the migrator
    • addChangeSet

      @NotNull public @NotNull SherlockMigratorBuilder addChangeSet(@NotNull @NotNull String changeSetId, @NotNull @NotNull io.reactivex.rxjava3.core.Completable changeSet)
      Adds change set to migration process.
      Parameters:
      changeSetId - unique change set id used. This is used as a lock id in migration process.
      changeSet - change set action that should be run if change set was not already applied
      Returns:
      the migrator
    • addChangeSet

      @NotNull public @NotNull SherlockMigratorBuilder addChangeSet(@NotNull @NotNull String changeSetId, @NotNull @NotNull Supplier<io.reactivex.rxjava3.core.Completable> changeSet)
      Adds change set to migration process.
      Parameters:
      changeSetId - unique change set id used. This is used as a lock id in migration process.
      changeSet - change set action that should be run if change set was not already applied
      Returns:
      the migrator
    • addAnnotatedChangeSets

      @NotNull public @NotNull SherlockMigratorBuilder addAnnotatedChangeSets(@NotNull @NotNull Object object)
    • build

      @NotNull public @NotNull SherlockMigrator build()
    • migrate

      @NotNull public @NotNull io.reactivex.rxjava3.core.Single<com.coditory.sherlock.migrator.MigrationResult> migrate()