-
Notifications
You must be signed in to change notification settings - Fork 158
Add getWorkerTaskReachability API #1919
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add getWorkerTaskReachability API #1919
Conversation
* the value is an empty list, the Build ID is not reachable on that queue. | ||
*/ | ||
public Map<String, List<TaskReachability>> getTaskQueueReachability() { | ||
return Collections.unmodifiableMap(taskQueueReachability); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be done in the constructor or by the constructor's caller (same with unmodifiable list below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer it to be here then in the constructor or trust the caller to have used the correct type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this is already merged, but curious why not the constructor? Why create a new object every time a getter is called if you don't need to?
temporal-sdk/src/main/java/io/temporal/client/BuildIdReachability.java
Outdated
Show resolved
Hide resolved
temporal-sdk/src/main/java/io/temporal/client/WorkerTaskReachability.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! I hope this wasn't something I was supposed to go back and add and forgot about 😬
Add getWorkerTaskReachability API
closes #1862