ygerzhedovich commented on code in PR #5004:
URL: https://github.com/apache/ignite-3/pull/5004#discussion_r1906724792
##########
modules/eventlog/src/main/java/org/apache/ignite/internal/eventlog/api/EventLog.java:
##########
@@ -44,7 +44,16 @@ public interface EventLog {
/**
* Writes event into every channel this event relates to.
*
- * @param eventProvider Event provider.
+ * @param event The event to log.
*/
- void log(Supplier<Event> eventProvider);
+ void log(Event event);
+
+ /**
+ * Lazy version of {@link #log(Event)}. It first checks if the events of
the given type are enabled and then logs the event.
+ * INVARIANT: type must be a valid event type and eventProvider must
provide an event of the same type.
+ *
+ * @param type the type of the event.
+ * @param eventProvider the event provider.
+ */
+ void log(String type, Supplier<Event> eventProvider);
Review Comment:
Why do we use type as String instead of enum?
--
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]