-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Refactoring to allow multiple transports in GAPIC clients #2156
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
Refactoring to allow multiple transports in GAPIC clients #2156
Conversation
14d346c to
8b036cb
Compare
8b036cb to
3c848bf
Compare
|
This is ready to review; it is only WIP because gax-java won't be released until this PR is approved. |
|
gax-java and toolkit are approved, PTAL here |
|
LGTM, others should approve also |
shinfan
left a comment
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.
Overall looks good to me. Just a few comments & questions
| } | ||
|
|
||
| /** | ||
| * Returns a builder for this class with recommened defaults for API methods, and the given |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| settingsBuilder = | ||
| ImmutableMap.Builder<String, RetrySettings> definitions = ImmutableMap.builder(); | ||
| RetrySettings settings = null; | ||
| settings = |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| // AUTO-GENERATED DOCUMENTATION AND CLASS | ||
| @Generated("by GAPIC v0.0.5") | ||
| @BetaApi | ||
| public abstract class DlpServiceStub implements BackgroundResource { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| /** | ||
| * Initiates an orderly shutdown in which preexisting calls continue but new calls are immediately | ||
| * cancelled. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| @Override | ||
| public void shutdown() { | ||
| backgroundResources.shutdown(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| // AUTO-GENERATED DOCUMENTATION AND CLASS | ||
| @Generated("by GAPIC v0.0.5") | ||
| @BetaApi | ||
| public class GrpcDlpServiceStub extends DlpServiceStub { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| ListRootCategoriesRequest.getDefaultInstance()), | ||
| io.grpc.protobuf.ProtoUtils.marshaller( | ||
| ListRootCategoriesResponse.getDefaultInstance()))); | ||
| private final BackgroundResource backgroundResources; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| /** | ||
| * Constructs an instance of GrpcDlpServiceStub, using the given settings. This is protected so | ||
| * that it easy to make a subclass, but otherwise, the static factory methods should be preferred. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
The code LGTM, assuming @shinfan 's concerns are addressed. I'm not sure if this could cause a performance hit because we're wrapping more stuff. Though I'm not sure if we should block on this. |
|
Addressed Shin's comments, PTAL @shinfan |
|
@pongad I don't think the extra stack frame matters. I think what does matter is that gax was refactored a bit to make this happen, so allocation characteristics may have changed at that level. Like you say, I don't think possible performance changes should impact this PR; however, I think it might be worth doing a perf test before we do a release of google-cloud-java. |
shinfan
left a comment
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.
LGTM
|
@garrettjonesgoogle I agree. That's what I meant; I just didn't think of this when looking at the gax PR. I'll work on measurement when I get cycles. |
|
Changes Unknown when pulling d5575d8 on garrettjonesgoogle:master into ** on GoogleCloudPlatform:master**. |
No description provided.