-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make calls on cacheArtifacts/reconnect/submit/canel non-blocking #556
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -259,6 +259,13 @@ protected TaskExecutorGateway getGateway() throws ExecutionException, Interrupte | |
return this.gateway.get(); | ||
} | ||
|
||
protected CompletableFuture<TaskExecutorGateway> getGatewayAsync() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How can this be async? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: no need to explicitly call this method async since the type already reflects that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, get rid of the blocking method. |
||
if (this.gateway == null) { | ||
throw new IllegalStateException("gateway is null"); | ||
} | ||
return this.gateway; | ||
} | ||
|
||
protected CompletableFuture<TaskExecutorGateway> reconnect() { | ||
this.gateway = rpcService.connect(registration.getTaskExecutorAddress(), TaskExecutorGateway.class) | ||
.whenComplete((gateway, throwable) -> { | ||
|
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.
nit: s/reconnect.*Gateway/reconnect