Package io.etcd.jetcd.api
Class ElectionGrpc.ElectionFutureStub
- java.lang.Object
-
- io.grpc.stub.AbstractStub<S>
-
- io.grpc.stub.AbstractFutureStub<ElectionGrpc.ElectionFutureStub>
-
- io.etcd.jetcd.api.ElectionGrpc.ElectionFutureStub
-
- Enclosing class:
- ElectionGrpc
public static final class ElectionGrpc.ElectionFutureStub extends io.grpc.stub.AbstractFutureStub<ElectionGrpc.ElectionFutureStub>
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 ElectionGrpc.ElectionFutureStubbuild(io.grpc.Channel channel, io.grpc.CallOptions callOptions)com.google.common.util.concurrent.ListenableFuture<CampaignResponse>campaign(CampaignRequest request)Campaign waits to acquire leadership in an election, returning a LeaderKey representing the leadership if successful.com.google.common.util.concurrent.ListenableFuture<LeaderResponse>leader(LeaderRequest request)Leader returns the current election proclamation, if any.com.google.common.util.concurrent.ListenableFuture<ProclaimResponse>proclaim(ProclaimRequest request)Proclaim updates the leader's posted value with a new value.com.google.common.util.concurrent.ListenableFuture<ResignResponse>resign(ResignRequest request)Resign releases election leadership so other campaigners may acquire leadership on the election.
-
-
-
Method Detail
-
build
protected ElectionGrpc.ElectionFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
- Specified by:
buildin classio.grpc.stub.AbstractStub<ElectionGrpc.ElectionFutureStub>
-
campaign
public com.google.common.util.concurrent.ListenableFuture<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 com.google.common.util.concurrent.ListenableFuture<ProclaimResponse> proclaim(ProclaimRequest request)
Proclaim updates the leader's posted value with a new value.
-
leader
public com.google.common.util.concurrent.ListenableFuture<LeaderResponse> leader(LeaderRequest request)
Leader returns the current election proclamation, if any.
-
resign
public com.google.common.util.concurrent.ListenableFuture<ResignResponse> resign(ResignRequest request)
Resign releases election leadership so other campaigners may acquire leadership on the election.
-
-