public static final class ElectionGrpc.ElectionStub extends io.grpc.stub.AbstractAsyncStub<ElectionGrpc.ElectionStub>
The election service exposes client-side election facilities as a gRPC interface.
| Modifier and Type | Method and Description |
|---|---|
protected ElectionGrpc.ElectionStub |
build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) |
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.
|
protected ElectionGrpc.ElectionStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
build in class io.grpc.stub.AbstractStub<ElectionGrpc.ElectionStub>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.
Copyright © 2021. All rights reserved.