Skip to content

Removing transport from ServiceOptions hierarchy#1723

Merged
garrettjonesgoogle merged 6 commits intogoogleapis:masterfrom
garrettjonesgoogle:master
Mar 15, 2017
Merged

Removing transport from ServiceOptions hierarchy#1723
garrettjonesgoogle merged 6 commits intogoogleapis:masterfrom
garrettjonesgoogle:master

Conversation

@garrettjonesgoogle
Copy link
Copy Markdown
Contributor

@garrettjonesgoogle garrettjonesgoogle commented Mar 9, 2017

Updates #1601

This allows a client to support multiple transports in the future,
e.g. Datastore supports http now but grpc support will be added
later.

Related changes:

  • Renaming HttpServiceOptions to HttpTransportOptions
  • Renaming GrpcServiceOptions to GrpcTransportOptions
  • Creating new TransportOptions interface

This allows a client to support multiple transports in the future,
e.g. Datastore supports http now but grpc support will be added
later.

Related changes:

* Renaming HttpServiceOptions to HttpTransportOptions
* Renaming GrpcServiceOptions to GrpcTransportOptions
* Creating new TransportOptions interface
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 9, 2017
@coveralls
Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling a829b26 on garrettjonesgoogle:master into ** on GoogleCloudPlatform:master**.

* credentials.
*/
public static RemoteComputeHelper create() {
HttpTransportOptions transportOptions = ComputeOptions.getDefaultHttpTransportOptions();

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@Override
protected int baseHashCode() {
return Objects.hash(super.baseHashCode(), executorFactoryClassName, initialTimeout,
public int hashCode() {

This comment was marked as spam.

This comment was marked as spam.

&& Objects.equals(executorFactoryClassName, other.executorFactoryClassName)
@Override
public boolean equals(Object obj) {
if (!(obj instanceof GrpcTransportOptions)) {

This comment was marked as spam.

This comment was marked as spam.

getFromServiceLoader(rpcFactoryClass, getDefaultRpcFactory()));
serviceRpcFactoryClassName = serviceRpcFactory.getClass().getName();
clock = firstNonNull(builder.clock, Clock.defaultClock());
transportOptions = firstNonNull(builder.transportOptions, getDefaultTransportOptions());

This comment was marked as spam.

This comment was marked as spam.

super(options);
}

@Override

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

public static HttpTransportOptions getDefaultHttpTransportOptions() {
return HttpTransportOptions.newBuilder().build();
}

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

assertThat(options.getPrefetchChunks()).isEqualTo(2);
}

class DummyTransportOptions implements TransportOptions {

This comment was marked as spam.

This comment was marked as spam.

public static HttpTransportOptions getDefaultHttpTransportOptions() {
return HttpTransportOptions.newBuilder().build();
}

This comment was marked as spam.

super(options);
}

@Override

This comment was marked as spam.

@garrettjonesgoogle
Copy link
Copy Markdown
Contributor Author

Addressed PR feedback, PTAL

@coveralls
Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling f638bab on garrettjonesgoogle:master into ** on GoogleCloudPlatform:master**.

Copy link
Copy Markdown
Contributor

@michaelbausor michaelbausor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of the codacy-bot errors are unused imports, is these any easy way to clean them up?


public DefaultBigQueryRpc(BigQueryOptions options) {
HttpTransportOptions transportOptions = options.getHttpTransportOptions();
HttpTransportOptions transportOptions = (HttpTransportOptions) options.getTransportOptions();

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@michaelbausor
Copy link
Copy Markdown
Contributor

LGTM

@garrettjonesgoogle
Copy link
Copy Markdown
Contributor Author

For the record: The Codacy warnings were already cleaned up before any reviews started.

Copy link
Copy Markdown
Contributor

@vam-google vam-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though the code duplication in setTransportOptions() method is still a concern for me (if not with an abstract class, i would still be happy to get rid from it somehow).

@Override
public boolean equals(Object obj) {
if (!(obj instanceof HttpTransportOptions)) {
if (obj == null) {

This comment was marked as spam.

This comment was marked as spam.

@garrettjonesgoogle garrettjonesgoogle merged commit 9278868 into googleapis:master Mar 15, 2017
chingor13 pushed a commit that referenced this pull request Jan 22, 2026
#1723)

* chore: Update generation configuration at Sat Jan 25 02:17:00 UTC 2025

* chore: Update generation configuration at Mon Jan 27 02:21:43 UTC 2025

* chore: Update generation configuration at Tue Jan 28 02:20:23 UTC 2025

* chore: Update generation configuration at Wed Jan 29 02:19:56 UTC 2025
chingor13 pushed a commit that referenced this pull request Feb 24, 2026
* chore: add link to guide on enable debug logging

* wording

Co-authored-by: Lawrence Qiu <[email protected]>

---------

Co-authored-by: Lawrence Qiu <[email protected]>
chingor13 pushed a commit that referenced this pull request Mar 12, 2026
* chore: add link to guide on enable debug logging

* wording

Co-authored-by: Lawrence Qiu <[email protected]>

---------

Co-authored-by: Lawrence Qiu <[email protected]>
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
googleapis#1723)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.springframework.boot:spring-boot](https://spring.io/projects/spring-boot) ([source](https://togithub.com/spring-projects/spring-boot)) | `3.3.2` -> `3.3.3` | [![age](https://developer.mend.io/api/mc/badges/age/maven/org.springframework.boot:spring-boot/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.springframework.boot:spring-boot/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.springframework.boot:spring-boot/3.3.2/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.springframework.boot:spring-boot/3.3.2/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>spring-projects/spring-boot (org.springframework.boot:spring-boot)</summary>

### [`v3.3.3`](https://togithub.com/spring-projects/spring-boot/compare/v3.3.2...v3.3.3)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/googleapis/java-spanner-jdbc).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
…o v1.125.0 (#1723)

* chore(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.125.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
meltsufin pushed a commit that referenced this pull request May 1, 2026
…o v1.125.0 (#1723)

* chore(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.125.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants