feat(hooks): Make hook enable flag non-default (#11159)

This commit is contained in:
Pedro Silva 2024-08-14 15:34:28 +01:00 committed by GitHub
parent 082ef5b351
commit c2dbfb8386
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 6 deletions

View File

@ -30,9 +30,7 @@ public interface MetadataChangeLogHook {
* Return whether the hook is enabled or not. If not enabled, the below invoke method is not * Return whether the hook is enabled or not. If not enabled, the below invoke method is not
* triggered * triggered
*/ */
default boolean isEnabled() { boolean isEnabled();
return true;
}
/** Invoke the hook when a MetadataChangeLog is received */ /** Invoke the hook when a MetadataChangeLog is received */
void invoke(@Nonnull MetadataChangeLog log) throws Exception; void invoke(@Nonnull MetadataChangeLog log) throws Exception;

View File

@ -20,9 +20,7 @@ public interface PlatformEventHook {
* Return whether the hook is enabled or not. If not enabled, the below invoke method is not * Return whether the hook is enabled or not. If not enabled, the below invoke method is not
* triggered * triggered
*/ */
default boolean isEnabled() { boolean isEnabled();
return true;
}
/** Invoke the hook when a PlatformEvent is received */ /** Invoke the hook when a PlatformEvent is received */
void invoke(@Nonnull OperationContext opContext, @Nonnull PlatformEvent event); void invoke(@Nonnull OperationContext opContext, @Nonnull PlatformEvent event);