@Override
  public final void close() {
    try {
      backgroundResources.close();
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new IllegalStateException("Failed to close resource", e);
    }
  }
Constructs an instance of HttpJsonMemorystoreStub, using the given settings. This is protected
so that it is easy to make a subclass, but otherwise, the static factory methods should be
preferred.
java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/stub/HttpJsonMemorystoreStub.java