Interface NamedQueueService
- All Known Implementing Classes:
BalancerDecisionQueueService
,BalancerRejectionQueueService
,SlowLogQueueService
,WALEventTrackerQueueService
In-memory Queue service provider for multiple use-cases. Implementers should be registered in
LogEventHandler
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Cleans up queues maintained by services.void
consumeEventFromDisruptor
(NamedQueuePayload namedQueuePayload) This implementation is generic for consuming records from LMAX disruptor and inserts records to EvictingQueue which is maintained by each ringbuffer provider.getEvent()
Retrieve event type for NamedQueueService implementation.getNamedQueueRecords
(NamedQueueGetRequest request) Retrieve in memory queue records from ringbuffervoid
persistAll
(Connection connection) Add all in memory queue records to system table.
-
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
Add all in memory queue records to system table. The implementors can use system table or direct HDFS file or ZK as persistence system.
-