Package io.etcd.jetcd.api
Class ElectionGrpc.ElectionImplBase
- java.lang.Object
-
- io.etcd.jetcd.api.ElectionGrpc.ElectionImplBase
-
- All Implemented Interfaces:
io.grpc.BindableService
- Enclosing class:
- ElectionGrpc
public abstract static class ElectionGrpc.ElectionImplBase extends java.lang.Object implements io.grpc.BindableServiceThe election service exposes client-side election facilities as a gRPC interface.
-
-
Constructor Summary
Constructors Constructor Description ElectionImplBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.grpc.ServerServiceDefinitionbindService()voidcampaign(CampaignRequest request, io.grpc.stub.StreamObserver<CampaignResponse> responseObserver)Campaign waits to acquire leadership in an election, returning a LeaderKey representing the leadership if successful.voidleader(LeaderRequest request, io.grpc.stub.StreamObserver<LeaderResponse> responseObserver)Leader returns the current election proclamation, if any.voidobserve(LeaderRequest request, io.grpc.stub.StreamObserver<LeaderResponse> responseObserver)Observe streams election proclamations in-order as made by the election's elected leaders.voidproclaim(ProclaimRequest request, io.grpc.stub.StreamObserver<ProclaimResponse> responseObserver)Proclaim updates the leader's posted value with a new value.voidresign(ResignRequest request, io.grpc.stub.StreamObserver<ResignResponse> responseObserver)Resign releases election leadership so other campaigners may acquire leadership on the election.
-
-
-
Method Detail
-
campaign
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.
-
proclaim
public void proclaim(ProclaimRequest request, io.grpc.stub.StreamObserver<ProclaimResponse> responseObserver)
Proclaim updates the leader's posted value with a new value.
-
leader
public void leader(LeaderRequest request, io.grpc.stub.StreamObserver<LeaderResponse> responseObserver)
Leader returns the current election proclamation, if any.
-
observe
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.
-
resign
public void resign(ResignRequest request, io.grpc.stub.StreamObserver<ResignResponse> responseObserver)
Resign releases election leadership so other campaigners may acquire leadership on the election.
-
bindService
public final io.grpc.ServerServiceDefinition bindService()
- Specified by:
bindServicein interfaceio.grpc.BindableService
-
-