Package io.etcd.jetcd.api
Class VertxElectionGrpc.ElectionVertxStub
- java.lang.Object
-
- io.grpc.stub.AbstractStub<VertxElectionGrpc.ElectionVertxStub>
-
- io.etcd.jetcd.api.VertxElectionGrpc.ElectionVertxStub
-
- Enclosing class:
- VertxElectionGrpc
public static final class VertxElectionGrpc.ElectionVertxStub extends io.grpc.stub.AbstractStub<VertxElectionGrpc.ElectionVertxStub>
The election service exposes client-side election facilities as a gRPC interface.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected VertxElectionGrpc.ElectionVertxStubbuild(io.grpc.Channel channel, io.grpc.CallOptions callOptions)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.io.vertx.core.streams.ReadStream<LeaderResponse>observe(LeaderRequest request)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.-
Methods inherited from class io.grpc.stub.AbstractStub
getCallOptions, getChannel, newStub, newStub, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOption, withWaitForReady
-
-
-
-
Method Detail
-
build
protected VertxElectionGrpc.ElectionVertxStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
- Specified by:
buildin classio.grpc.stub.AbstractStub<VertxElectionGrpc.ElectionVertxStub>
-
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 io.vertx.core.streams.ReadStream<LeaderResponse> observe(LeaderRequest request)
Observe streams election proclamations in-order as made by the election's elected leaders.
-
-