Interface NamedQueueService

All Known Implementing Classes:
BalancerDecisionQueueService, BalancerRejectionQueueService, SlowLogQueueService, WALEventTrackerQueueService

@Private public interface NamedQueueService
In-memory Queue service provider for multiple use-cases. Implementers should be registered in LogEventHandler
  • Method Details

    • getEvent

      Retrieve event type for NamedQueueService implementation.
      Returns:
      NamedQueuePayload.NamedQueueEvent
    • consumeEventFromDisruptor

      This implementation is generic for consuming records from LMAX disruptor and inserts records to EvictingQueue which is maintained by each ringbuffer provider.
      Parameters:
      namedQueuePayload - namedQueue payload from disruptor ring buffer
    • clearNamedQueue

      boolean clearNamedQueue()
      Cleans up queues maintained by services.
      Returns:
      true if slow log payloads are cleaned up, false otherwise
    • getNamedQueueRecords

      Retrieve in memory queue records from ringbuffer
      Parameters:
      request - namedQueue request with event type
      Returns:
      queue records from ringbuffer after filter (if applied)
    • persistAll

      void persistAll(Connection connection)
      Add all in memory queue records to system table. The implementors can use system table or direct HDFS file or ZK as persistence system.