Enum Class NoopCallback

java.lang.Object
java.lang.Enum<NoopCallback>
migratedb.v1.core.internal.callback.NoopCallback
All Implemented Interfaces:
Serializable, Comparable<NoopCallback>, java.lang.constant.Constable, Callback

public enum NoopCallback extends Enum<NoopCallback> implements Callback
Callback that does nothing.
  • Enum Constant Details

  • Method Details

    • values

      public static NoopCallback[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static NoopCallback valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • supports

      public boolean supports(Event event, Context context)
      Description copied from interface: Callback
      Whether this callback supports this event or not. This is primarily meant as a way to optimize event handling by avoiding unnecessary connection state setups for events that will not be handled anyway.
      Specified by:
      supports in interface Callback
      Parameters:
      event - The event to check.
      context - The context for this event.
      Returns:
      true if it can be handled, false if not.
    • canHandleInTransaction

      public boolean canHandleInTransaction(Event event, Context context)
      Description copied from interface: Callback
      Whether this event can be handled in a transaction or whether it must be handled outside a transaction instead. In the vast majority of the cases the answer will be true. Only in the rare cases where non-transactional statements are executed should this return false. This method is called before Callback.handle(Event, Context) in order to determine in advance whether a transaction can be used or not.
      Specified by:
      canHandleInTransaction in interface Callback
      Parameters:
      event - The event to check.
      context - The context for this event.
      Returns:
      true if it can be handled within a transaction (almost all cases). false if it must be handled outside a transaction instead (very rare).
    • handle

      public void handle(Event event, Context context)
      Description copied from interface: Callback
      Handles this MigrateDB lifecycle event.
      Specified by:
      handle in interface Callback
      Parameters:
      event - The event to handle.
      context - The context for this event.
    • getCallbackName

      public String getCallbackName()
      Description copied from interface: Callback
      The callback name, MigrateDB will use this to sort the callbacks alphabetically before executing them
      Specified by:
      getCallbackName in interface Callback
      Returns:
      The callback name