Enum NoopCallback
- java.lang.Object
-
- java.lang.Enum<NoopCallback>
-
- migratedb.v1.core.internal.callback.NoopCallback
-
- All Implemented Interfaces:
Serializable,Comparable<NoopCallback>,Callback
public enum NoopCallback extends Enum<NoopCallback> implements Callback
Callback that does nothing.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanHandleInTransaction(Event event, Context context)Whether this event can be handled in a transaction or whether it must be handled outside a transaction instead.StringgetCallbackName()The callback name, MigrateDB will use this to sort the callbacks alphabetically before executing themvoidhandle(Event event, Context context)Handles this MigrateDB lifecycle event.booleansupports(Event event, Context context)Whether this callback supports this event or not.static NoopCallbackvalueOf(String name)Returns the enum constant of this type with the specified name.static NoopCallback[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final NoopCallback INSTANCE
-
-
Method Detail
-
values
public static NoopCallback[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NoopCallback c : NoopCallback.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NoopCallback valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
supports
public boolean supports(Event event, Context context)
Description copied from interface:CallbackWhether 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.
-
canHandleInTransaction
public boolean canHandleInTransaction(Event event, Context context)
Description copied from interface:CallbackWhether 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 betrue. Only in the rare cases where non-transactional statements are executed should this returnfalse. This method is called beforeCallback.handle(Event, Context)in order to determine in advance whether a transaction can be used or not.- Specified by:
canHandleInTransactionin interfaceCallback- Parameters:
event- The event to check.context- The context for this event.- Returns:
trueif it can be handled within a transaction (almost all cases).falseif it must be handled outside a transaction instead (very rare).
-
handle
public void handle(Event event, Context context)
Description copied from interface:CallbackHandles this MigrateDB lifecycle event.
-
getCallbackName
public String getCallbackName()
Description copied from interface:CallbackThe callback name, MigrateDB will use this to sort the callbacks alphabetically before executing them- Specified by:
getCallbackNamein interfaceCallback- Returns:
- The callback name
-
-