Class LeaderService

java.lang.Object
org.apache.pulsar.functions.worker.LeaderService
All Implemented Interfaces:
Serializable, AutoCloseable, org.apache.pulsar.client.api.ConsumerEventListener

public class LeaderService extends Object implements AutoCloseable, org.apache.pulsar.client.api.ConsumerEventListener
See Also:
  • Constructor Details

  • Method Details

    • start

      public void start() throws org.apache.pulsar.client.api.PulsarClientException
      Throws:
      org.apache.pulsar.client.api.PulsarClientException
    • becameActive

      public void becameActive(org.apache.pulsar.client.api.Consumer<?> consumer, int partitionId)
      Specified by:
      becameActive in interface org.apache.pulsar.client.api.ConsumerEventListener
    • becameInactive

      public void becameInactive(org.apache.pulsar.client.api.Consumer<?> consumer, int partitionId)
      Specified by:
      becameInactive in interface org.apache.pulsar.client.api.ConsumerEventListener
    • isLeader

      public boolean isLeader()
    • close

      public void close() throws org.apache.pulsar.client.api.PulsarClientException
      Specified by:
      close in interface AutoCloseable
      Throws:
      org.apache.pulsar.client.api.PulsarClientException