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.0.10
Show newest version
package io.helidon.config.etcd.internal.client.proto;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.49.2)",
    comments = "Source: rpc.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class LeaseGrpc {

  private LeaseGrpc() {}

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

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor getLeaseGrantMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "LeaseGrant",
      requestType = io.helidon.config.etcd.internal.client.proto.LeaseGrantRequest.class,
      responseType = io.helidon.config.etcd.internal.client.proto.LeaseGrantResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getLeaseGrantMethod() {
    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(SERVICE_NAME, "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;
  }

  private static volatile io.grpc.MethodDescriptor getLeaseRevokeMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "LeaseRevoke",
      requestType = io.helidon.config.etcd.internal.client.proto.LeaseRevokeRequest.class,
      responseType = io.helidon.config.etcd.internal.client.proto.LeaseRevokeResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getLeaseRevokeMethod() {
    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(SERVICE_NAME, "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;
  }

  private static volatile io.grpc.MethodDescriptor getLeaseKeepAliveMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "LeaseKeepAlive",
      requestType = io.helidon.config.etcd.internal.client.proto.LeaseKeepAliveRequest.class,
      responseType = io.helidon.config.etcd.internal.client.proto.LeaseKeepAliveResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
  public static io.grpc.MethodDescriptor getLeaseKeepAliveMethod() {
    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(SERVICE_NAME, "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;
  }

  private static volatile io.grpc.MethodDescriptor getLeaseTimeToLiveMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "LeaseTimeToLive",
      requestType = io.helidon.config.etcd.internal.client.proto.LeaseTimeToLiveRequest.class,
      responseType = io.helidon.config.etcd.internal.client.proto.LeaseTimeToLiveResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getLeaseTimeToLiveMethod() {
    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(SERVICE_NAME, "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) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public LeaseStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new LeaseStub(channel, callOptions);
        }
      };
    return LeaseStub.newStub(factory, 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) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public LeaseBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new LeaseBlockingStub(channel, callOptions);
        }
      };
    return LeaseBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static LeaseFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public LeaseFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new LeaseFutureStub(channel, callOptions);
        }
      };
    return LeaseFutureStub.newStub(factory, 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) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLeaseGrantMethod(), 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) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLeaseRevokeMethod(), 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 io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getLeaseKeepAliveMethod(), responseObserver); } /** *
     * LeaseTimeToLive retrieves lease information.
     * 
*/ public void leaseTimeToLive(io.helidon.config.etcd.internal.client.proto.LeaseTimeToLiveRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLeaseTimeToLiveMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getLeaseGrantMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< io.helidon.config.etcd.internal.client.proto.LeaseGrantRequest, io.helidon.config.etcd.internal.client.proto.LeaseGrantResponse>( this, METHODID_LEASE_GRANT))) .addMethod( getLeaseRevokeMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< io.helidon.config.etcd.internal.client.proto.LeaseRevokeRequest, io.helidon.config.etcd.internal.client.proto.LeaseRevokeResponse>( this, METHODID_LEASE_REVOKE))) .addMethod( getLeaseKeepAliveMethod(), io.grpc.stub.ServerCalls.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( getLeaseTimeToLiveMethod(), io.grpc.stub.ServerCalls.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.AbstractAsyncStub { 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) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getLeaseGrantMethod(), 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) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getLeaseRevokeMethod(), 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 io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getLeaseKeepAliveMethod(), getCallOptions()), responseObserver); } /** *
     * LeaseTimeToLive retrieves lease information.
     * 
*/ public void leaseTimeToLive(io.helidon.config.etcd.internal.client.proto.LeaseTimeToLiveRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getLeaseTimeToLiveMethod(), getCallOptions()), request, responseObserver); } } /** */ public static final class LeaseBlockingStub extends io.grpc.stub.AbstractBlockingStub { 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 io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getLeaseGrantMethod(), 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 io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getLeaseRevokeMethod(), 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 io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getLeaseTimeToLiveMethod(), getCallOptions(), request); } } /** */ public static final class LeaseFutureStub extends io.grpc.stub.AbstractFutureStub { 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 io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getLeaseGrantMethod(), 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 io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getLeaseRevokeMethod(), getCallOptions()), request); } /** *
     * LeaseTimeToLive retrieves lease information.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture leaseTimeToLive( io.helidon.config.etcd.internal.client.proto.LeaseTimeToLiveRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getLeaseTimeToLiveMethod(), 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(getLeaseGrantMethod()) .addMethod(getLeaseRevokeMethod()) .addMethod(getLeaseKeepAliveMethod()) .addMethod(getLeaseTimeToLiveMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy