Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* The election service exposes client-side election facilities as a gRPC interface.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.39.0)",
comments = "Source: election.proto")
public final class ElectionGrpc {
private ElectionGrpc() {}
public static final String SERVICE_NAME = "v3electionpb.Election";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getCampaignMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Campaign",
requestType = io.etcd.jetcd.api.CampaignRequest.class,
responseType = io.etcd.jetcd.api.CampaignResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getCampaignMethod() {
io.grpc.MethodDescriptor getCampaignMethod;
if ((getCampaignMethod = ElectionGrpc.getCampaignMethod) == null) {
synchronized (ElectionGrpc.class) {
if ((getCampaignMethod = ElectionGrpc.getCampaignMethod) == null) {
ElectionGrpc.getCampaignMethod = getCampaignMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Campaign"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.CampaignRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.CampaignResponse.getDefaultInstance()))
.setSchemaDescriptor(new ElectionMethodDescriptorSupplier("Campaign"))
.build();
}
}
}
return getCampaignMethod;
}
private static volatile io.grpc.MethodDescriptor getProclaimMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Proclaim",
requestType = io.etcd.jetcd.api.ProclaimRequest.class,
responseType = io.etcd.jetcd.api.ProclaimResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getProclaimMethod() {
io.grpc.MethodDescriptor getProclaimMethod;
if ((getProclaimMethod = ElectionGrpc.getProclaimMethod) == null) {
synchronized (ElectionGrpc.class) {
if ((getProclaimMethod = ElectionGrpc.getProclaimMethod) == null) {
ElectionGrpc.getProclaimMethod = getProclaimMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Proclaim"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.ProclaimRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.ProclaimResponse.getDefaultInstance()))
.setSchemaDescriptor(new ElectionMethodDescriptorSupplier("Proclaim"))
.build();
}
}
}
return getProclaimMethod;
}
private static volatile io.grpc.MethodDescriptor getLeaderMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Leader",
requestType = io.etcd.jetcd.api.LeaderRequest.class,
responseType = io.etcd.jetcd.api.LeaderResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getLeaderMethod() {
io.grpc.MethodDescriptor getLeaderMethod;
if ((getLeaderMethod = ElectionGrpc.getLeaderMethod) == null) {
synchronized (ElectionGrpc.class) {
if ((getLeaderMethod = ElectionGrpc.getLeaderMethod) == null) {
ElectionGrpc.getLeaderMethod = getLeaderMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Leader"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.LeaderRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.LeaderResponse.getDefaultInstance()))
.setSchemaDescriptor(new ElectionMethodDescriptorSupplier("Leader"))
.build();
}
}
}
return getLeaderMethod;
}
private static volatile io.grpc.MethodDescriptor getObserveMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Observe",
requestType = io.etcd.jetcd.api.LeaderRequest.class,
responseType = io.etcd.jetcd.api.LeaderResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getObserveMethod() {
io.grpc.MethodDescriptor getObserveMethod;
if ((getObserveMethod = ElectionGrpc.getObserveMethod) == null) {
synchronized (ElectionGrpc.class) {
if ((getObserveMethod = ElectionGrpc.getObserveMethod) == null) {
ElectionGrpc.getObserveMethod = getObserveMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Observe"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.LeaderRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.LeaderResponse.getDefaultInstance()))
.setSchemaDescriptor(new ElectionMethodDescriptorSupplier("Observe"))
.build();
}
}
}
return getObserveMethod;
}
private static volatile io.grpc.MethodDescriptor getResignMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Resign",
requestType = io.etcd.jetcd.api.ResignRequest.class,
responseType = io.etcd.jetcd.api.ResignResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getResignMethod() {
io.grpc.MethodDescriptor getResignMethod;
if ((getResignMethod = ElectionGrpc.getResignMethod) == null) {
synchronized (ElectionGrpc.class) {
if ((getResignMethod = ElectionGrpc.getResignMethod) == null) {
ElectionGrpc.getResignMethod = getResignMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Resign"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.ResignRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.ResignResponse.getDefaultInstance()))
.setSchemaDescriptor(new ElectionMethodDescriptorSupplier("Resign"))
.build();
}
}
}
return getResignMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static ElectionStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ElectionStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ElectionStub(channel, callOptions);
}
};
return ElectionStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ElectionBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ElectionBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ElectionBlockingStub(channel, callOptions);
}
};
return ElectionBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static ElectionFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ElectionFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ElectionFutureStub(channel, callOptions);
}
};
return ElectionFutureStub.newStub(factory, channel);
}
/**
*
* The election service exposes client-side election facilities as a gRPC interface.
*
*/
public static abstract class ElectionImplBase implements io.grpc.BindableService {
/**
*
* Campaign waits to acquire leadership in an election, returning a LeaderKey
* representing the leadership if successful. The LeaderKey can then be used
* to issue new values on the election, transactionally guard API requests on
* leadership still being held, and resign from the election.
*
* Resign releases election leadership so other campaigners may acquire
* leadership on the election.
*
*/
public void resign(io.etcd.jetcd.api.ResignRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getResignMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getCampaignMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.CampaignRequest,
io.etcd.jetcd.api.CampaignResponse>(
this, METHODID_CAMPAIGN)))
.addMethod(
getProclaimMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.ProclaimRequest,
io.etcd.jetcd.api.ProclaimResponse>(
this, METHODID_PROCLAIM)))
.addMethod(
getLeaderMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.LeaderRequest,
io.etcd.jetcd.api.LeaderResponse>(
this, METHODID_LEADER)))
.addMethod(
getObserveMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
io.etcd.jetcd.api.LeaderRequest,
io.etcd.jetcd.api.LeaderResponse>(
this, METHODID_OBSERVE)))
.addMethod(
getResignMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.ResignRequest,
io.etcd.jetcd.api.ResignResponse>(
this, METHODID_RESIGN)))
.build();
}
}
/**
*
* The election service exposes client-side election facilities as a gRPC interface.
*
*/
public static final class ElectionStub extends io.grpc.stub.AbstractAsyncStub {
private ElectionStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ElectionStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ElectionStub(channel, callOptions);
}
/**
*
* Campaign waits to acquire leadership in an election, returning a LeaderKey
* representing the leadership if successful. The LeaderKey can then be used
* to issue new values on the election, transactionally guard API requests on
* leadership still being held, and resign from the election.
*
* The election service exposes client-side election facilities as a gRPC interface.
*
*/
public static final class ElectionBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private ElectionBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ElectionBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ElectionBlockingStub(channel, callOptions);
}
/**
*
* Campaign waits to acquire leadership in an election, returning a LeaderKey
* representing the leadership if successful. The LeaderKey can then be used
* to issue new values on the election, transactionally guard API requests on
* leadership still being held, and resign from the election.
*
* The election service exposes client-side election facilities as a gRPC interface.
*
*/
public static final class ElectionFutureStub extends io.grpc.stub.AbstractFutureStub {
private ElectionFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ElectionFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ElectionFutureStub(channel, callOptions);
}
/**
*
* Campaign waits to acquire leadership in an election, returning a LeaderKey
* representing the leadership if successful. The LeaderKey can then be used
* to issue new values on the election, transactionally guard API requests on
* leadership still being held, and resign from the election.
*