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

io.helidon.config.etcd.internal.client.proto.LeaseGrpc Maven / Gradle / Ivy

There is a newer version: 4.1.1
Show newest version
package io.helidon.config.etcd.internal.client.proto;

import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.11.0)",
    comments = "Source: rpc.proto")
public final class LeaseGrpc {

  private LeaseGrpc() {}

  public static final String SERVICE_NAME = "etcdserverpb.Lease";

  // Static method descriptors that strictly reflect the proto.
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  @java.lang.Deprecated // Use {@link #getLeaseGrantMethod()} instead. 
  public static final io.grpc.MethodDescriptor METHOD_LEASE_GRANT = getLeaseGrantMethodHelper();

  private static volatile io.grpc.MethodDescriptor getLeaseGrantMethod;

  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static io.grpc.MethodDescriptor getLeaseGrantMethod() {
    return getLeaseGrantMethodHelper();
  }

  private static io.grpc.MethodDescriptor getLeaseGrantMethodHelper() {
    io.grpc.MethodDescriptor getLeaseGrantMethod;
    if ((getLeaseGrantMethod = LeaseGrpc.getLeaseGrantMethod) == null) {
      synchronized (LeaseGrpc.class) {
        if ((getLeaseGrantMethod = LeaseGrpc.getLeaseGrantMethod) == null) {
          LeaseGrpc.getLeaseGrantMethod = getLeaseGrantMethod = 
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(
                  "etcdserverpb.Lease", "LeaseGrant"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.helidon.config.etcd.internal.client.proto.LeaseGrantRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.helidon.config.etcd.internal.client.proto.LeaseGrantResponse.getDefaultInstance()))
                  .setSchemaDescriptor(new LeaseMethodDescriptorSupplier("LeaseGrant"))
                  .build();
          }
        }
     }
     return getLeaseGrantMethod;
  }
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  @java.lang.Deprecated // Use {@link #getLeaseRevokeMethod()} instead. 
  public static final io.grpc.MethodDescriptor METHOD_LEASE_REVOKE = getLeaseRevokeMethodHelper();

  private static volatile io.grpc.MethodDescriptor getLeaseRevokeMethod;

  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static io.grpc.MethodDescriptor getLeaseRevokeMethod() {
    return getLeaseRevokeMethodHelper();
  }

  private static io.grpc.MethodDescriptor getLeaseRevokeMethodHelper() {
    io.grpc.MethodDescriptor getLeaseRevokeMethod;
    if ((getLeaseRevokeMethod = LeaseGrpc.getLeaseRevokeMethod) == null) {
      synchronized (LeaseGrpc.class) {
        if ((getLeaseRevokeMethod = LeaseGrpc.getLeaseRevokeMethod) == null) {
          LeaseGrpc.getLeaseRevokeMethod = getLeaseRevokeMethod = 
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(
                  "etcdserverpb.Lease", "LeaseRevoke"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.helidon.config.etcd.internal.client.proto.LeaseRevokeRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.helidon.config.etcd.internal.client.proto.LeaseRevokeResponse.getDefaultInstance()))
                  .setSchemaDescriptor(new LeaseMethodDescriptorSupplier("LeaseRevoke"))
                  .build();
          }
        }
     }
     return getLeaseRevokeMethod;
  }
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  @java.lang.Deprecated // Use {@link #getLeaseKeepAliveMethod()} instead. 
  public static final io.grpc.MethodDescriptor METHOD_LEASE_KEEP_ALIVE = getLeaseKeepAliveMethodHelper();

  private static volatile io.grpc.MethodDescriptor getLeaseKeepAliveMethod;

  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static io.grpc.MethodDescriptor getLeaseKeepAliveMethod() {
    return getLeaseKeepAliveMethodHelper();
  }

  private static io.grpc.MethodDescriptor getLeaseKeepAliveMethodHelper() {
    io.grpc.MethodDescriptor getLeaseKeepAliveMethod;
    if ((getLeaseKeepAliveMethod = LeaseGrpc.getLeaseKeepAliveMethod) == null) {
      synchronized (LeaseGrpc.class) {
        if ((getLeaseKeepAliveMethod = LeaseGrpc.getLeaseKeepAliveMethod) == null) {
          LeaseGrpc.getLeaseKeepAliveMethod = getLeaseKeepAliveMethod = 
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
              .setFullMethodName(generateFullMethodName(
                  "etcdserverpb.Lease", "LeaseKeepAlive"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.helidon.config.etcd.internal.client.proto.LeaseKeepAliveRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.helidon.config.etcd.internal.client.proto.LeaseKeepAliveResponse.getDefaultInstance()))
                  .setSchemaDescriptor(new LeaseMethodDescriptorSupplier("LeaseKeepAlive"))
                  .build();
          }
        }
     }
     return getLeaseKeepAliveMethod;
  }
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  @java.lang.Deprecated // Use {@link #getLeaseTimeToLiveMethod()} instead. 
  public static final io.grpc.MethodDescriptor METHOD_LEASE_TIME_TO_LIVE = getLeaseTimeToLiveMethodHelper();

  private static volatile io.grpc.MethodDescriptor getLeaseTimeToLiveMethod;

  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static io.grpc.MethodDescriptor getLeaseTimeToLiveMethod() {
    return getLeaseTimeToLiveMethodHelper();
  }

  private static io.grpc.MethodDescriptor getLeaseTimeToLiveMethodHelper() {
    io.grpc.MethodDescriptor getLeaseTimeToLiveMethod;
    if ((getLeaseTimeToLiveMethod = LeaseGrpc.getLeaseTimeToLiveMethod) == null) {
      synchronized (LeaseGrpc.class) {
        if ((getLeaseTimeToLiveMethod = LeaseGrpc.getLeaseTimeToLiveMethod) == null) {
          LeaseGrpc.getLeaseTimeToLiveMethod = getLeaseTimeToLiveMethod = 
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(
                  "etcdserverpb.Lease", "LeaseTimeToLive"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.helidon.config.etcd.internal.client.proto.LeaseTimeToLiveRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.helidon.config.etcd.internal.client.proto.LeaseTimeToLiveResponse.getDefaultInstance()))
                  .setSchemaDescriptor(new LeaseMethodDescriptorSupplier("LeaseTimeToLive"))
                  .build();
          }
        }
     }
     return getLeaseTimeToLiveMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static LeaseStub newStub(io.grpc.Channel channel) {
    return new LeaseStub(channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static LeaseBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    return new LeaseBlockingStub(channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static LeaseFutureStub newFutureStub(
      io.grpc.Channel channel) {
    return new LeaseFutureStub(channel);
  }

  /**
   */
  public static abstract class LeaseImplBase implements io.grpc.BindableService {

    /**
     * 
     * LeaseGrant creates a lease which expires if the server does not receive a keepAlive
     * within a given time to live period. All keys attached to the lease will be expired and
     * deleted if the lease expires. Each expired key generates a delete event in the event history.
     * 
*/ public void leaseGrant(io.helidon.config.etcd.internal.client.proto.LeaseGrantRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getLeaseGrantMethodHelper(), responseObserver); } /** *
     * LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.
     * 
*/ public void leaseRevoke(io.helidon.config.etcd.internal.client.proto.LeaseRevokeRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getLeaseRevokeMethodHelper(), responseObserver); } /** *
     * LeaseKeepAlive keeps the lease alive by streaming keep alive requests from the client
     * to the server and streaming keep alive responses from the server to the client.
     * 
*/ public io.grpc.stub.StreamObserver leaseKeepAlive( io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getLeaseKeepAliveMethodHelper(), responseObserver); } /** *
     * LeaseTimeToLive retrieves lease information.
     * 
*/ public void leaseTimeToLive(io.helidon.config.etcd.internal.client.proto.LeaseTimeToLiveRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getLeaseTimeToLiveMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getLeaseGrantMethodHelper(), asyncUnaryCall( new MethodHandlers< io.helidon.config.etcd.internal.client.proto.LeaseGrantRequest, io.helidon.config.etcd.internal.client.proto.LeaseGrantResponse>( this, METHODID_LEASE_GRANT))) .addMethod( getLeaseRevokeMethodHelper(), asyncUnaryCall( new MethodHandlers< io.helidon.config.etcd.internal.client.proto.LeaseRevokeRequest, io.helidon.config.etcd.internal.client.proto.LeaseRevokeResponse>( this, METHODID_LEASE_REVOKE))) .addMethod( getLeaseKeepAliveMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.helidon.config.etcd.internal.client.proto.LeaseKeepAliveRequest, io.helidon.config.etcd.internal.client.proto.LeaseKeepAliveResponse>( this, METHODID_LEASE_KEEP_ALIVE))) .addMethod( getLeaseTimeToLiveMethodHelper(), asyncUnaryCall( new MethodHandlers< io.helidon.config.etcd.internal.client.proto.LeaseTimeToLiveRequest, io.helidon.config.etcd.internal.client.proto.LeaseTimeToLiveResponse>( this, METHODID_LEASE_TIME_TO_LIVE))) .build(); } } /** */ public static final class LeaseStub extends io.grpc.stub.AbstractStub { private LeaseStub(io.grpc.Channel channel) { super(channel); } private LeaseStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected LeaseStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new LeaseStub(channel, callOptions); } /** *
     * LeaseGrant creates a lease which expires if the server does not receive a keepAlive
     * within a given time to live period. All keys attached to the lease will be expired and
     * deleted if the lease expires. Each expired key generates a delete event in the event history.
     * 
*/ public void leaseGrant(io.helidon.config.etcd.internal.client.proto.LeaseGrantRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(getLeaseGrantMethodHelper(), getCallOptions()), request, responseObserver); } /** *
     * LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.
     * 
*/ public void leaseRevoke(io.helidon.config.etcd.internal.client.proto.LeaseRevokeRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(getLeaseRevokeMethodHelper(), getCallOptions()), request, responseObserver); } /** *
     * LeaseKeepAlive keeps the lease alive by streaming keep alive requests from the client
     * to the server and streaming keep alive responses from the server to the client.
     * 
*/ public io.grpc.stub.StreamObserver leaseKeepAlive( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( getChannel().newCall(getLeaseKeepAliveMethodHelper(), getCallOptions()), responseObserver); } /** *
     * LeaseTimeToLive retrieves lease information.
     * 
*/ public void leaseTimeToLive(io.helidon.config.etcd.internal.client.proto.LeaseTimeToLiveRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(getLeaseTimeToLiveMethodHelper(), getCallOptions()), request, responseObserver); } } /** */ public static final class LeaseBlockingStub extends io.grpc.stub.AbstractStub { private LeaseBlockingStub(io.grpc.Channel channel) { super(channel); } private LeaseBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected LeaseBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new LeaseBlockingStub(channel, callOptions); } /** *
     * LeaseGrant creates a lease which expires if the server does not receive a keepAlive
     * within a given time to live period. All keys attached to the lease will be expired and
     * deleted if the lease expires. Each expired key generates a delete event in the event history.
     * 
*/ public io.helidon.config.etcd.internal.client.proto.LeaseGrantResponse leaseGrant(io.helidon.config.etcd.internal.client.proto.LeaseGrantRequest request) { return blockingUnaryCall( getChannel(), getLeaseGrantMethodHelper(), getCallOptions(), request); } /** *
     * LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.
     * 
*/ public io.helidon.config.etcd.internal.client.proto.LeaseRevokeResponse leaseRevoke(io.helidon.config.etcd.internal.client.proto.LeaseRevokeRequest request) { return blockingUnaryCall( getChannel(), getLeaseRevokeMethodHelper(), getCallOptions(), request); } /** *
     * LeaseTimeToLive retrieves lease information.
     * 
*/ public io.helidon.config.etcd.internal.client.proto.LeaseTimeToLiveResponse leaseTimeToLive(io.helidon.config.etcd.internal.client.proto.LeaseTimeToLiveRequest request) { return blockingUnaryCall( getChannel(), getLeaseTimeToLiveMethodHelper(), getCallOptions(), request); } } /** */ public static final class LeaseFutureStub extends io.grpc.stub.AbstractStub { private LeaseFutureStub(io.grpc.Channel channel) { super(channel); } private LeaseFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected LeaseFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new LeaseFutureStub(channel, callOptions); } /** *
     * LeaseGrant creates a lease which expires if the server does not receive a keepAlive
     * within a given time to live period. All keys attached to the lease will be expired and
     * deleted if the lease expires. Each expired key generates a delete event in the event history.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture leaseGrant( io.helidon.config.etcd.internal.client.proto.LeaseGrantRequest request) { return futureUnaryCall( getChannel().newCall(getLeaseGrantMethodHelper(), getCallOptions()), request); } /** *
     * LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture leaseRevoke( io.helidon.config.etcd.internal.client.proto.LeaseRevokeRequest request) { return futureUnaryCall( getChannel().newCall(getLeaseRevokeMethodHelper(), getCallOptions()), request); } /** *
     * LeaseTimeToLive retrieves lease information.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture leaseTimeToLive( io.helidon.config.etcd.internal.client.proto.LeaseTimeToLiveRequest request) { return futureUnaryCall( getChannel().newCall(getLeaseTimeToLiveMethodHelper(), getCallOptions()), request); } } private static final int METHODID_LEASE_GRANT = 0; private static final int METHODID_LEASE_REVOKE = 1; private static final int METHODID_LEASE_TIME_TO_LIVE = 2; private static final int METHODID_LEASE_KEEP_ALIVE = 3; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { private final LeaseImplBase serviceImpl; private final int methodId; MethodHandlers(LeaseImplBase serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_LEASE_GRANT: serviceImpl.leaseGrant((io.helidon.config.etcd.internal.client.proto.LeaseGrantRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_LEASE_REVOKE: serviceImpl.leaseRevoke((io.helidon.config.etcd.internal.client.proto.LeaseRevokeRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_LEASE_TIME_TO_LIVE: serviceImpl.leaseTimeToLive((io.helidon.config.etcd.internal.client.proto.LeaseTimeToLiveRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); } } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke( io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_LEASE_KEEP_ALIVE: return (io.grpc.stub.StreamObserver) serviceImpl.leaseKeepAlive( (io.grpc.stub.StreamObserver) responseObserver); default: throw new AssertionError(); } } } private static abstract class LeaseBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { LeaseBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return io.helidon.config.etcd.internal.client.proto.EtcdProto.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("Lease"); } } private static final class LeaseFileDescriptorSupplier extends LeaseBaseDescriptorSupplier { LeaseFileDescriptorSupplier() {} } private static final class LeaseMethodDescriptorSupplier extends LeaseBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; LeaseMethodDescriptorSupplier(String methodName) { this.methodName = methodName; } @java.lang.Override public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { return getServiceDescriptor().findMethodByName(methodName); } } private static volatile io.grpc.ServiceDescriptor serviceDescriptor; public static io.grpc.ServiceDescriptor getServiceDescriptor() { io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { synchronized (LeaseGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new LeaseFileDescriptorSupplier()) .addMethod(getLeaseGrantMethodHelper()) .addMethod(getLeaseRevokeMethodHelper()) .addMethod(getLeaseKeepAliveMethodHelper()) .addMethod(getLeaseTimeToLiveMethodHelper()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy