public abstract static class ElectionGrpc.ElectionImplBase extends Object implements io.grpc.BindableService
The election service exposes client-side election facilities as a gRPC interface.
| Constructor and Description |
|---|
ElectionImplBase() |
| Modifier and Type | Method and Description |
|---|---|
io.grpc.ServerServiceDefinition |
bindService() |
void |
campaign(CampaignRequest request,
io.grpc.stub.StreamObserver<CampaignResponse> responseObserver)
Campaign waits to acquire leadership in an election, returning a LeaderKey
representing the leadership if successful.
|
void |
leader(LeaderRequest request,
io.grpc.stub.StreamObserver<LeaderResponse> responseObserver)
Leader returns the current election proclamation, if any.
|
void |
observe(LeaderRequest request,
io.grpc.stub.StreamObserver<LeaderResponse> responseObserver)
Observe streams election proclamations in-order as made by the election's
elected leaders.
|
void |
proclaim(ProclaimRequest request,
io.grpc.stub.StreamObserver<ProclaimResponse> responseObserver)
Proclaim updates the leader's posted value with a new value.
|
void |
resign(ResignRequest request,
io.grpc.stub.StreamObserver<ResignResponse> responseObserver)
Resign releases election leadership so other campaigners may acquire
leadership on the election.
|
public void campaign(CampaignRequest request, io.grpc.stub.StreamObserver<CampaignResponse> responseObserver)
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 void proclaim(ProclaimRequest request, io.grpc.stub.StreamObserver<ProclaimResponse> responseObserver)
Proclaim updates the leader's posted value with a new value.
public void leader(LeaderRequest request, io.grpc.stub.StreamObserver<LeaderResponse> responseObserver)
Leader returns the current election proclamation, if any.
public void observe(LeaderRequest request, io.grpc.stub.StreamObserver<LeaderResponse> responseObserver)
Observe streams election proclamations in-order as made by the election's elected leaders.
public void resign(ResignRequest request, io.grpc.stub.StreamObserver<ResignResponse> responseObserver)
Resign releases election leadership so other campaigners may acquire leadership on the election.
public final io.grpc.ServerServiceDefinition bindService()
bindService in interface io.grpc.BindableServiceCopyright © 2021. All rights reserved.