FANNG1 commented on code in PR #5110:
URL: https://github.com/apache/gravitino/pull/5110#discussion_r1800331960


##########
core/src/main/java/org/apache/gravitino/listener/api/EventListenerPlugin.java:
##########
@@ -95,17 +97,29 @@ enum Mode {
   void stop() throws RuntimeException;
 
   /**
-   * Handles events generated after the completion of an operation. 
Implementers are responsible for
-   * processing these events, which may involve additional logic to respond to 
the operation
-   * outcomes.
+   * Handles events generated after the completion of an operation.
    *
-   * <p>This method provides a hook for post-operation event processing, 
allowing plugins to react
-   * or adapt based on the event details.
+   * <p>This method provides a hook for post-operation event processing, you 
couldn't change the
+   * resource in the event.
    *
-   * @param event The event to be processed.
-   * @throws RuntimeException Indicates issues encountered during event 
processing.
+   * @param postEvent The post event to be processed.
+   * @throws RuntimeException Indicates issues encountered during event 
processing, this has no
+   *     affect to the operation.
    */
-  void onPostEvent(Event event) throws RuntimeException;
+  default void onPostEvent(Event postEvent) throws RuntimeException {}
+
+  /**
+   * Handles pre events generated before the operation.
+   *
+   * <p>This method provides a hook for pre-operation event processing, any 
changes you make to the
+   * resources during the event will be reflected in the operations that 
follow. You must set mode
+   * to SYNC to process pre events.

Review Comment:
   removed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to