All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.managedkafka.v1.stub.GrpcManagedKafkaStub Maven / Gradle / Ivy

/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.cloud.managedkafka.v1.stub;

import static com.google.cloud.managedkafka.v1.ManagedKafkaClient.ListClustersPagedResponse;
import static com.google.cloud.managedkafka.v1.ManagedKafkaClient.ListConsumerGroupsPagedResponse;
import static com.google.cloud.managedkafka.v1.ManagedKafkaClient.ListLocationsPagedResponse;
import static com.google.cloud.managedkafka.v1.ManagedKafkaClient.ListTopicsPagedResponse;

import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.RequestParamsBuilder;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.cloud.managedkafka.v1.Cluster;
import com.google.cloud.managedkafka.v1.ConsumerGroup;
import com.google.cloud.managedkafka.v1.CreateClusterRequest;
import com.google.cloud.managedkafka.v1.CreateTopicRequest;
import com.google.cloud.managedkafka.v1.DeleteClusterRequest;
import com.google.cloud.managedkafka.v1.DeleteConsumerGroupRequest;
import com.google.cloud.managedkafka.v1.DeleteTopicRequest;
import com.google.cloud.managedkafka.v1.GetClusterRequest;
import com.google.cloud.managedkafka.v1.GetConsumerGroupRequest;
import com.google.cloud.managedkafka.v1.GetTopicRequest;
import com.google.cloud.managedkafka.v1.ListClustersRequest;
import com.google.cloud.managedkafka.v1.ListClustersResponse;
import com.google.cloud.managedkafka.v1.ListConsumerGroupsRequest;
import com.google.cloud.managedkafka.v1.ListConsumerGroupsResponse;
import com.google.cloud.managedkafka.v1.ListTopicsRequest;
import com.google.cloud.managedkafka.v1.ListTopicsResponse;
import com.google.cloud.managedkafka.v1.OperationMetadata;
import com.google.cloud.managedkafka.v1.Topic;
import com.google.cloud.managedkafka.v1.UpdateClusterRequest;
import com.google.cloud.managedkafka.v1.UpdateConsumerGroupRequest;
import com.google.cloud.managedkafka.v1.UpdateTopicRequest;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.GrpcOperationsStub;
import com.google.protobuf.Empty;
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * gRPC stub implementation for the ManagedKafka service API.
 *
 * 

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") public class GrpcManagedKafkaStub extends ManagedKafkaStub { private static final MethodDescriptor listClustersMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.managedkafka.v1.ManagedKafka/ListClusters") .setRequestMarshaller(ProtoUtils.marshaller(ListClustersRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListClustersResponse.getDefaultInstance())) .build(); private static final MethodDescriptor getClusterMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.managedkafka.v1.ManagedKafka/GetCluster") .setRequestMarshaller(ProtoUtils.marshaller(GetClusterRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Cluster.getDefaultInstance())) .build(); private static final MethodDescriptor createClusterMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.managedkafka.v1.ManagedKafka/CreateCluster") .setRequestMarshaller( ProtoUtils.marshaller(CreateClusterRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor updateClusterMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.managedkafka.v1.ManagedKafka/UpdateCluster") .setRequestMarshaller( ProtoUtils.marshaller(UpdateClusterRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor deleteClusterMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.managedkafka.v1.ManagedKafka/DeleteCluster") .setRequestMarshaller( ProtoUtils.marshaller(DeleteClusterRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor listTopicsMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.managedkafka.v1.ManagedKafka/ListTopics") .setRequestMarshaller(ProtoUtils.marshaller(ListTopicsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListTopicsResponse.getDefaultInstance())) .build(); private static final MethodDescriptor getTopicMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.managedkafka.v1.ManagedKafka/GetTopic") .setRequestMarshaller(ProtoUtils.marshaller(GetTopicRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance())) .build(); private static final MethodDescriptor createTopicMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.managedkafka.v1.ManagedKafka/CreateTopic") .setRequestMarshaller(ProtoUtils.marshaller(CreateTopicRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance())) .build(); private static final MethodDescriptor updateTopicMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.managedkafka.v1.ManagedKafka/UpdateTopic") .setRequestMarshaller(ProtoUtils.marshaller(UpdateTopicRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance())) .build(); private static final MethodDescriptor deleteTopicMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.managedkafka.v1.ManagedKafka/DeleteTopic") .setRequestMarshaller(ProtoUtils.marshaller(DeleteTopicRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); private static final MethodDescriptor listConsumerGroupsMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.managedkafka.v1.ManagedKafka/ListConsumerGroups") .setRequestMarshaller( ProtoUtils.marshaller(ListConsumerGroupsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListConsumerGroupsResponse.getDefaultInstance())) .build(); private static final MethodDescriptor getConsumerGroupMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.managedkafka.v1.ManagedKafka/GetConsumerGroup") .setRequestMarshaller( ProtoUtils.marshaller(GetConsumerGroupRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ConsumerGroup.getDefaultInstance())) .build(); private static final MethodDescriptor updateConsumerGroupMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.managedkafka.v1.ManagedKafka/UpdateConsumerGroup") .setRequestMarshaller( ProtoUtils.marshaller(UpdateConsumerGroupRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ConsumerGroup.getDefaultInstance())) .build(); private static final MethodDescriptor deleteConsumerGroupMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.managedkafka.v1.ManagedKafka/DeleteConsumerGroup") .setRequestMarshaller( ProtoUtils.marshaller(DeleteConsumerGroupRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.location.Locations/ListLocations") .setRequestMarshaller( ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) .build(); private static final MethodDescriptor getLocationMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.location.Locations/GetLocation") .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) .build(); private final UnaryCallable listClustersCallable; private final UnaryCallable listClustersPagedCallable; private final UnaryCallable getClusterCallable; private final UnaryCallable createClusterCallable; private final OperationCallable createClusterOperationCallable; private final UnaryCallable updateClusterCallable; private final OperationCallable updateClusterOperationCallable; private final UnaryCallable deleteClusterCallable; private final OperationCallable deleteClusterOperationCallable; private final UnaryCallable listTopicsCallable; private final UnaryCallable listTopicsPagedCallable; private final UnaryCallable getTopicCallable; private final UnaryCallable createTopicCallable; private final UnaryCallable updateTopicCallable; private final UnaryCallable deleteTopicCallable; private final UnaryCallable listConsumerGroupsCallable; private final UnaryCallable listConsumerGroupsPagedCallable; private final UnaryCallable getConsumerGroupCallable; private final UnaryCallable updateConsumerGroupCallable; private final UnaryCallable deleteConsumerGroupCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; public static final GrpcManagedKafkaStub create(ManagedKafkaStubSettings settings) throws IOException { return new GrpcManagedKafkaStub(settings, ClientContext.create(settings)); } public static final GrpcManagedKafkaStub create(ClientContext clientContext) throws IOException { return new GrpcManagedKafkaStub(ManagedKafkaStubSettings.newBuilder().build(), clientContext); } public static final GrpcManagedKafkaStub create( ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { return new GrpcManagedKafkaStub( ManagedKafkaStubSettings.newBuilder().build(), clientContext, callableFactory); } /** * Constructs an instance of GrpcManagedKafkaStub, 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. */ protected GrpcManagedKafkaStub(ManagedKafkaStubSettings settings, ClientContext clientContext) throws IOException { this(settings, clientContext, new GrpcManagedKafkaCallableFactory()); } /** * Constructs an instance of GrpcManagedKafkaStub, 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. */ protected GrpcManagedKafkaStub( ManagedKafkaStubSettings settings, ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); GrpcCallSettings listClustersTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listClustersMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings getClusterTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getClusterMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings createClusterTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createClusterMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings updateClusterTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateClusterMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("cluster.name", String.valueOf(request.getCluster().getName())); return builder.build(); }) .build(); GrpcCallSettings deleteClusterTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteClusterMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings listTopicsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listTopicsMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings getTopicTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getTopicMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings createTopicTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createTopicMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings updateTopicTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateTopicMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("topic.name", String.valueOf(request.getTopic().getName())); return builder.build(); }) .build(); GrpcCallSettings deleteTopicTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteTopicMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings listConsumerGroupsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listConsumerGroupsMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings getConsumerGroupTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getConsumerGroupMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings updateConsumerGroupTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateConsumerGroupMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "consumer_group.name", String.valueOf(request.getConsumerGroup().getName())); return builder.build(); }) .build(); GrpcCallSettings deleteConsumerGroupTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteConsumerGroupMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings getLocationTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getLocationMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); this.listClustersCallable = callableFactory.createUnaryCallable( listClustersTransportSettings, settings.listClustersSettings(), clientContext); this.listClustersPagedCallable = callableFactory.createPagedCallable( listClustersTransportSettings, settings.listClustersSettings(), clientContext); this.getClusterCallable = callableFactory.createUnaryCallable( getClusterTransportSettings, settings.getClusterSettings(), clientContext); this.createClusterCallable = callableFactory.createUnaryCallable( createClusterTransportSettings, settings.createClusterSettings(), clientContext); this.createClusterOperationCallable = callableFactory.createOperationCallable( createClusterTransportSettings, settings.createClusterOperationSettings(), clientContext, operationsStub); this.updateClusterCallable = callableFactory.createUnaryCallable( updateClusterTransportSettings, settings.updateClusterSettings(), clientContext); this.updateClusterOperationCallable = callableFactory.createOperationCallable( updateClusterTransportSettings, settings.updateClusterOperationSettings(), clientContext, operationsStub); this.deleteClusterCallable = callableFactory.createUnaryCallable( deleteClusterTransportSettings, settings.deleteClusterSettings(), clientContext); this.deleteClusterOperationCallable = callableFactory.createOperationCallable( deleteClusterTransportSettings, settings.deleteClusterOperationSettings(), clientContext, operationsStub); this.listTopicsCallable = callableFactory.createUnaryCallable( listTopicsTransportSettings, settings.listTopicsSettings(), clientContext); this.listTopicsPagedCallable = callableFactory.createPagedCallable( listTopicsTransportSettings, settings.listTopicsSettings(), clientContext); this.getTopicCallable = callableFactory.createUnaryCallable( getTopicTransportSettings, settings.getTopicSettings(), clientContext); this.createTopicCallable = callableFactory.createUnaryCallable( createTopicTransportSettings, settings.createTopicSettings(), clientContext); this.updateTopicCallable = callableFactory.createUnaryCallable( updateTopicTransportSettings, settings.updateTopicSettings(), clientContext); this.deleteTopicCallable = callableFactory.createUnaryCallable( deleteTopicTransportSettings, settings.deleteTopicSettings(), clientContext); this.listConsumerGroupsCallable = callableFactory.createUnaryCallable( listConsumerGroupsTransportSettings, settings.listConsumerGroupsSettings(), clientContext); this.listConsumerGroupsPagedCallable = callableFactory.createPagedCallable( listConsumerGroupsTransportSettings, settings.listConsumerGroupsSettings(), clientContext); this.getConsumerGroupCallable = callableFactory.createUnaryCallable( getConsumerGroupTransportSettings, settings.getConsumerGroupSettings(), clientContext); this.updateConsumerGroupCallable = callableFactory.createUnaryCallable( updateConsumerGroupTransportSettings, settings.updateConsumerGroupSettings(), clientContext); this.deleteConsumerGroupCallable = callableFactory.createUnaryCallable( deleteConsumerGroupTransportSettings, settings.deleteConsumerGroupSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); this.listLocationsPagedCallable = callableFactory.createPagedCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); this.getLocationCallable = callableFactory.createUnaryCallable( getLocationTransportSettings, settings.getLocationSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } public GrpcOperationsStub getOperationsStub() { return operationsStub; } @Override public UnaryCallable listClustersCallable() { return listClustersCallable; } @Override public UnaryCallable listClustersPagedCallable() { return listClustersPagedCallable; } @Override public UnaryCallable getClusterCallable() { return getClusterCallable; } @Override public UnaryCallable createClusterCallable() { return createClusterCallable; } @Override public OperationCallable createClusterOperationCallable() { return createClusterOperationCallable; } @Override public UnaryCallable updateClusterCallable() { return updateClusterCallable; } @Override public OperationCallable updateClusterOperationCallable() { return updateClusterOperationCallable; } @Override public UnaryCallable deleteClusterCallable() { return deleteClusterCallable; } @Override public OperationCallable deleteClusterOperationCallable() { return deleteClusterOperationCallable; } @Override public UnaryCallable listTopicsCallable() { return listTopicsCallable; } @Override public UnaryCallable listTopicsPagedCallable() { return listTopicsPagedCallable; } @Override public UnaryCallable getTopicCallable() { return getTopicCallable; } @Override public UnaryCallable createTopicCallable() { return createTopicCallable; } @Override public UnaryCallable updateTopicCallable() { return updateTopicCallable; } @Override public UnaryCallable deleteTopicCallable() { return deleteTopicCallable; } @Override public UnaryCallable listConsumerGroupsCallable() { return listConsumerGroupsCallable; } @Override public UnaryCallable listConsumerGroupsPagedCallable() { return listConsumerGroupsPagedCallable; } @Override public UnaryCallable getConsumerGroupCallable() { return getConsumerGroupCallable; } @Override public UnaryCallable updateConsumerGroupCallable() { return updateConsumerGroupCallable; } @Override public UnaryCallable deleteConsumerGroupCallable() { return deleteConsumerGroupCallable; } @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; } @Override public UnaryCallable listLocationsPagedCallable() { return listLocationsPagedCallable; } @Override public UnaryCallable getLocationCallable() { return getLocationCallable; } @Override public final void close() { try { backgroundResources.close(); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new IllegalStateException("Failed to close resource", e); } } @Override public void shutdown() { backgroundResources.shutdown(); } @Override public boolean isShutdown() { return backgroundResources.isShutdown(); } @Override public boolean isTerminated() { return backgroundResources.isTerminated(); } @Override public void shutdownNow() { backgroundResources.shutdownNow(); } @Override public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { return backgroundResources.awaitTermination(duration, unit); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy