KAFKA-14500; [4/N] Add Timer interface#13708
Conversation
|
Thanks @jeffkbkim! Any chance you could add Thanks! |
|
@jeffkbkim Could you update the interface as we discussed offline? |
dajac
left a comment
There was a problem hiding this comment.
I left a few minor comments. Should we update the title of the PR as well?
| /** | ||
| * An interface to schedule and cancel operations. | ||
| */ | ||
| @InterfaceStability.Unstable |
There was a problem hiding this comment.
nit: We don't need this because it is an internal interface anyway.
| * @param deadlineMs The deadline to expire the operation in milliseconds. | ||
| * @param operation The operation to perform. | ||
| */ | ||
| void schedule(String key, long deadlineMs, Runnable operation); |
There was a problem hiding this comment.
As a second though, I also wonder if we should use a delay instead of a deadline. This may be easier to use. We could also use TimeUnit.
Adds the Timer interface that will be used by the new group coordinator.
Committer Checklist (excluded from commit message)