Class VertxElectionGrpc.ElectionVertxImplBase

  • All Implemented Interfaces:
    io.grpc.BindableService
    Enclosing class:
    VertxElectionGrpc

    public abstract static class VertxElectionGrpc.ElectionVertxImplBase
    extends java.lang.Object
    implements io.grpc.BindableService
      The election service exposes client-side election facilities as a gRPC interface.
     
    • Constructor Detail

      • ElectionVertxImplBase

        public ElectionVertxImplBase()
    • Method Detail

      • withCompression

        public VertxElectionGrpc.ElectionVertxImplBase withCompression​(java.lang.String compression)
        Set whether the server will try to use a compressed response.
        Parameters:
        compression - the compression, e.g gzip
      • campaign

        public io.vertx.core.Future<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 io.vertx.core.Future<ProclaimResponse> proclaim​(ProclaimRequest request)
          Proclaim updates the leader's posted value with a new value.
         
      • leader

        public io.vertx.core.Future<LeaderResponse> leader​(LeaderRequest request)
          Leader returns the current election proclamation, if any.
         
      • resign

        public io.vertx.core.Future<ResignResponse> resign​(ResignRequest request)
          Resign releases election leadership so other campaigners may acquire
          leadership on the election.
         
      • observe

        public void observe​(LeaderRequest request,
                            io.vertx.core.streams.WriteStream<LeaderResponse> response)
          Observe streams election proclamations in-order as made by the election's
          elected leaders.
         
      • bindService

        public final io.grpc.ServerServiceDefinition bindService()
        Specified by:
        bindService in interface io.grpc.BindableService