com.ibm.etcd.api.LeaseGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of etcd-java Show documentation
Show all versions of etcd-java Show documentation
etcd3 java client and utilities
package com.ibm.etcd.api;
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.30.1)",
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.
private static volatile io.grpc.MethodDescriptor getLeaseGrantMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "LeaseGrant",
requestType = com.ibm.etcd.api.LeaseGrantRequest.class,
responseType = com.ibm.etcd.api.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(
com.ibm.etcd.api.LeaseGrantRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.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 = com.ibm.etcd.api.LeaseRevokeRequest.class,
responseType = com.ibm.etcd.api.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(
com.ibm.etcd.api.LeaseRevokeRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.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 = com.ibm.etcd.api.LeaseKeepAliveRequest.class,
responseType = com.ibm.etcd.api.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(
com.ibm.etcd.api.LeaseKeepAliveRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.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 = com.ibm.etcd.api.LeaseTimeToLiveRequest.class,
responseType = com.ibm.etcd.api.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(
com.ibm.etcd.api.LeaseTimeToLiveRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.LeaseTimeToLiveResponse.getDefaultInstance()))
.setSchemaDescriptor(new LeaseMethodDescriptorSupplier("LeaseTimeToLive"))
.build();
}
}
}
return getLeaseTimeToLiveMethod;
}
private static volatile io.grpc.MethodDescriptor getLeaseLeasesMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "LeaseLeases",
requestType = com.ibm.etcd.api.LeaseLeasesRequest.class,
responseType = com.ibm.etcd.api.LeaseLeasesResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getLeaseLeasesMethod() {
io.grpc.MethodDescriptor getLeaseLeasesMethod;
if ((getLeaseLeasesMethod = LeaseGrpc.getLeaseLeasesMethod) == null) {
synchronized (LeaseGrpc.class) {
if ((getLeaseLeasesMethod = LeaseGrpc.getLeaseLeasesMethod) == null) {
LeaseGrpc.getLeaseLeasesMethod = getLeaseLeasesMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "LeaseLeases"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.LeaseLeasesRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.LeaseLeasesResponse.getDefaultInstance()))
.setSchemaDescriptor(new LeaseMethodDescriptorSupplier("LeaseLeases"))
.build();
}
}
}
return getLeaseLeasesMethod;
}
/**
* 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(com.ibm.etcd.api.LeaseGrantRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getLeaseGrantMethod(), responseObserver);
}
/**
*
* LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.
*
*/
public void leaseRevoke(com.ibm.etcd.api.LeaseRevokeRequest request,
io.grpc.stub.StreamObserver responseObserver) {
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 asyncUnimplementedStreamingCall(getLeaseKeepAliveMethod(), responseObserver);
}
/**
*
* LeaseTimeToLive retrieves lease information.
*
*/
public void leaseTimeToLive(com.ibm.etcd.api.LeaseTimeToLiveRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getLeaseTimeToLiveMethod(), responseObserver);
}
/**
*
* LeaseLeases lists all existing leases.
*
*/
public void leaseLeases(com.ibm.etcd.api.LeaseLeasesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getLeaseLeasesMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getLeaseGrantMethod(),
asyncUnaryCall(
new MethodHandlers<
com.ibm.etcd.api.LeaseGrantRequest,
com.ibm.etcd.api.LeaseGrantResponse>(
this, METHODID_LEASE_GRANT)))
.addMethod(
getLeaseRevokeMethod(),
asyncUnaryCall(
new MethodHandlers<
com.ibm.etcd.api.LeaseRevokeRequest,
com.ibm.etcd.api.LeaseRevokeResponse>(
this, METHODID_LEASE_REVOKE)))
.addMethod(
getLeaseKeepAliveMethod(),
asyncBidiStreamingCall(
new MethodHandlers<
com.ibm.etcd.api.LeaseKeepAliveRequest,
com.ibm.etcd.api.LeaseKeepAliveResponse>(
this, METHODID_LEASE_KEEP_ALIVE)))
.addMethod(
getLeaseTimeToLiveMethod(),
asyncUnaryCall(
new MethodHandlers<
com.ibm.etcd.api.LeaseTimeToLiveRequest,
com.ibm.etcd.api.LeaseTimeToLiveResponse>(
this, METHODID_LEASE_TIME_TO_LIVE)))
.addMethod(
getLeaseLeasesMethod(),
asyncUnaryCall(
new MethodHandlers<
com.ibm.etcd.api.LeaseLeasesRequest,
com.ibm.etcd.api.LeaseLeasesResponse>(
this, METHODID_LEASE_LEASES)))
.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(com.ibm.etcd.api.LeaseGrantRequest request,
io.grpc.stub.StreamObserver responseObserver) {
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(com.ibm.etcd.api.LeaseRevokeRequest request,
io.grpc.stub.StreamObserver responseObserver) {
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 asyncBidiStreamingCall(
getChannel().newCall(getLeaseKeepAliveMethod(), getCallOptions()), responseObserver);
}
/**
*
* LeaseTimeToLive retrieves lease information.
*
*/
public void leaseTimeToLive(com.ibm.etcd.api.LeaseTimeToLiveRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getLeaseTimeToLiveMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* LeaseLeases lists all existing leases.
*
*/
public void leaseLeases(com.ibm.etcd.api.LeaseLeasesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getLeaseLeasesMethod(), 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 com.ibm.etcd.api.LeaseGrantResponse leaseGrant(com.ibm.etcd.api.LeaseGrantRequest request) {
return blockingUnaryCall(
getChannel(), getLeaseGrantMethod(), getCallOptions(), request);
}
/**
*
* LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.
*
*/
public com.ibm.etcd.api.LeaseRevokeResponse leaseRevoke(com.ibm.etcd.api.LeaseRevokeRequest request) {
return blockingUnaryCall(
getChannel(), getLeaseRevokeMethod(), getCallOptions(), request);
}
/**
*
* LeaseTimeToLive retrieves lease information.
*
*/
public com.ibm.etcd.api.LeaseTimeToLiveResponse leaseTimeToLive(com.ibm.etcd.api.LeaseTimeToLiveRequest request) {
return blockingUnaryCall(
getChannel(), getLeaseTimeToLiveMethod(), getCallOptions(), request);
}
/**
*
* LeaseLeases lists all existing leases.
*
*/
public com.ibm.etcd.api.LeaseLeasesResponse leaseLeases(com.ibm.etcd.api.LeaseLeasesRequest request) {
return blockingUnaryCall(
getChannel(), getLeaseLeasesMethod(), 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(
com.ibm.etcd.api.LeaseGrantRequest request) {
return 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(
com.ibm.etcd.api.LeaseRevokeRequest request) {
return futureUnaryCall(
getChannel().newCall(getLeaseRevokeMethod(), getCallOptions()), request);
}
/**
*
* LeaseTimeToLive retrieves lease information.
*
*/
public com.google.common.util.concurrent.ListenableFuture leaseTimeToLive(
com.ibm.etcd.api.LeaseTimeToLiveRequest request) {
return futureUnaryCall(
getChannel().newCall(getLeaseTimeToLiveMethod(), getCallOptions()), request);
}
/**
*
* LeaseLeases lists all existing leases.
*
*/
public com.google.common.util.concurrent.ListenableFuture leaseLeases(
com.ibm.etcd.api.LeaseLeasesRequest request) {
return futureUnaryCall(
getChannel().newCall(getLeaseLeasesMethod(), 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_LEASES = 3;
private static final int METHODID_LEASE_KEEP_ALIVE = 4;
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((com.ibm.etcd.api.LeaseGrantRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LEASE_REVOKE:
serviceImpl.leaseRevoke((com.ibm.etcd.api.LeaseRevokeRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LEASE_TIME_TO_LIVE:
serviceImpl.leaseTimeToLive((com.ibm.etcd.api.LeaseTimeToLiveRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LEASE_LEASES:
serviceImpl.leaseLeases((com.ibm.etcd.api.LeaseLeasesRequest) 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 com.ibm.etcd.api.Rpc.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())
.addMethod(getLeaseLeasesMethod())
.build();
}
}
}
return result;
}
}