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.
| Modifier and Type | Method and Description |
|---|---|
protected ElectionGrpc.ElectionFutureStub |
build(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.
|
protected ElectionGrpc.ElectionFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
build in class io.grpc.stub.AbstractStub<ElectionGrpc.ElectionFutureStub>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.
public com.google.common.util.concurrent.ListenableFuture<ProclaimResponse> proclaim(ProclaimRequest request)
Proclaim updates the leader's posted value with a new value.
public com.google.common.util.concurrent.ListenableFuture<LeaderResponse> leader(LeaderRequest request)
Leader returns the current election proclamation, if any.
public com.google.common.util.concurrent.ListenableFuture<ResignResponse> resign(ResignRequest request)
Resign releases election leadership so other campaigners may acquire leadership on the election.
Copyright © 2020. All rights reserved.