rkhachatryan commented on code in PR #24904:
URL: https://github.com/apache/flink/pull/24904#discussion_r1631631388


##########
flink-core/src/main/java/org/apache/flink/api/common/operators/MailboxExecutor.java:
##########
@@ -86,6 +87,25 @@ public interface MailboxExecutor {
     /** A constant for empty args to save on object allocation. */
     Object[] EMPTY_ARGS = new Object[0];
 
+    /** Extra options to configure enqueued mails. */
+    @Experimental
+    interface MailOptions {
+        static MailOptions options() {
+            return new MailOptionsImpl();

Review Comment:
   > How would you envision this to grow/develop in the future? For every 
combination of potential options to have constants? 🤔
   
   I'd have constants for the most common combinations.
   
   > Ditto about immutability. Creating a copy of an object on every setter 
call would be painful. Or do you mean to have the full builder pattern - 
mutable public API class, that builds immutable internal class?
   
   Can't we just use factory?
   And maybe hide the constructor to make things more flexible - that should 
allow to switch from class to an interface if necessary in the future.
   
   Maybe I'm lacking some context, but I don't envision many options here. Do 
you?
   If we expect say 5+ options soon then yes, builder would make more sense to 
me.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to