Package io.etcd.jetcd.api
Class VertxElectionGrpc.ElectionVertxImplBase
- java.lang.Object
-
- io.etcd.jetcd.api.VertxElectionGrpc.ElectionVertxImplBase
-
- All Implemented Interfaces:
io.grpc.BindableService
- Enclosing class:
- VertxElectionGrpc
public abstract static class VertxElectionGrpc.ElectionVertxImplBase extends java.lang.Object implements io.grpc.BindableServiceThe election service exposes client-side election facilities as a gRPC interface.
-
-
Constructor Summary
Constructors Constructor Description ElectionVertxImplBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.grpc.ServerServiceDefinitionbindService()io.vertx.core.Future<CampaignResponse>campaign(CampaignRequest request)Campaign waits to acquire leadership in an election, returning a LeaderKey representing the leadership if successful.io.vertx.core.Future<LeaderResponse>leader(LeaderRequest request)Leader returns the current election proclamation, if any.voidobserve(LeaderRequest request, io.vertx.core.streams.WriteStream<LeaderResponse> response)Observe streams election proclamations in-order as made by the election's elected leaders.io.vertx.core.Future<ProclaimResponse>proclaim(ProclaimRequest request)Proclaim updates the leader's posted value with a new value.io.vertx.core.Future<ResignResponse>resign(ResignRequest request)Resign releases election leadership so other campaigners may acquire leadership on the election.VertxElectionGrpc.ElectionVertxImplBasewithCompression(java.lang.String compression)Set whether the server will try to use a compressed response.
-
-
-
Method Detail
-
withCompression
public VertxElectionGrpc.ElectionVertxImplBase withCompression(java.lang.String compression)
Set whether the server will try to use a compressed response.- Parameters:
compression- the compression, e.ggzip
-
campaign
public io.vertx.core.Future<CampaignResponse> campaign(CampaignRequest request)
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.
-
proclaim
public io.vertx.core.Future<ProclaimResponse> proclaim(ProclaimRequest request)
Proclaim updates the leader's posted value with a new value.
-
leader
public io.vertx.core.Future<LeaderResponse> leader(LeaderRequest request)
Leader returns the current election proclamation, if any.
-
resign
public io.vertx.core.Future<ResignResponse> resign(ResignRequest request)
Resign releases election leadership so other campaigners may acquire leadership on the election.
-
observe
public void observe(LeaderRequest request, io.vertx.core.streams.WriteStream<LeaderResponse> response)
Observe streams election proclamations in-order as made by the election's elected leaders.
-
bindService
public final io.grpc.ServerServiceDefinition bindService()
- Specified by:
bindServicein interfaceio.grpc.BindableService
-
-