pnowojski commented on a change in pull request #9772: [FLINK-14199] Only use dedicated/named classes for mailbox letters. URL: https://github.com/apache/flink/pull/9772#discussion_r334912526
########## File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/mailbox/MailboxSender.java ########## @@ -29,17 +29,29 @@ /** * Enqueues the given letter to the mailbox and blocks until there is capacity for a successful put. * + * <p>An optional description can be added to ease debugging and error-reporting. Any object can be passed on which + * {@link Object#toString()} is lazily invoked. In most cases, it should be a {@link String} or + * {@link org.apache.flink.streaming.runtime.tasks.mailbox.LazyString}. If no explicit description is taken, the + * command itself is used and {@code toString()} will be invoked on it. + * * @param letter the letter to enqueue. + * @param description the optional description for the command that is used for debugging and error-reporting. * @throws MailboxStateException if the mailbox is quiesced or closed. */ - void putMail(@Nonnull Runnable letter) throws MailboxStateException; + void putMail(@Nonnull Runnable letter, Object description) throws MailboxStateException; Review comment: `Object`? that's really not self documenting :( What about overloading this with `String description` or `LazyString description` versions? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services