Interface Writer

All Known Implementing Classes:
DataplaneAuthWriter, KafkaAuthWriter

public interface Writer
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if this is the master writer and is ready to process requests
    void
    startWriter(int generationId)
    Starts master writer with the specified generation id.
    void
    stopWriter(Integer generationId)
    Stops this writer because a new master writer was elected.
  • Method Details

    • startWriter

      void startWriter(int generationId)
      Starts master writer with the specified generation id. Writer generation is determined by the MetadataServiceCoordinator during writer election.
      Parameters:
      generationId - Generation id of writer
    • stopWriter

      void stopWriter(Integer generationId)
      Stops this writer because a new master writer was elected. If `generationId` is null, the writer is stopped regardless of the current generation of the writer. If not, the writer is stopped only if its current generation matches the provided value.
      Parameters:
      generationId - Generation id of writer being stopped or null to stop regardless of current writer generation
    • ready

      boolean ready()
      Returns true if this is the master writer and is ready to process requests