/** Returns the object with the settings used for calls to batchWriteSpans. */ public UnaryCallSettings<BatchWriteSpansRequest, Empty> batchWriteSpansSettings() { return ((TraceServiceStubSettings) getStubSettings()).batchWriteSpansSettings(); }
/** * Constructs an instance of GrpcTraceServiceStub, 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 GrpcTraceServiceStub( TraceServiceStubSettings settings, ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; GrpcCallSettings<BatchWriteSpansRequest, Empty> batchWriteSpansTransportSettings = GrpcCallSettings.<BatchWriteSpansRequest, Empty>newBuilder() .setMethodDescriptor(batchWriteSpansMethodDescriptor) .build(); GrpcCallSettings<Span, Span> createSpanTransportSettings = GrpcCallSettings.<Span, Span>newBuilder() .setMethodDescriptor(createSpanMethodDescriptor) .build(); this.batchWriteSpansCallable = callableFactory.createUnaryCallable( batchWriteSpansTransportSettings, settings.batchWriteSpansSettings(), clientContext); this.createSpanCallable = callableFactory.createUnaryCallable( createSpanTransportSettings, settings.createSpanSettings(), clientContext); backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); }