@InterfaceAudience.Private @InterfaceStability.Evolving public class NamedQueueRecorder extends Object
Modifier and Type | Field and Description |
---|---|
private com.lmax.disruptor.dsl.Disruptor<RingBufferEnvelope> |
disruptor |
private static boolean |
isInit |
private static Object |
LOCK |
private LogEventHandler |
logEventHandler |
private static NamedQueueRecorder |
namedQueueRecorder |
Modifier | Constructor and Description |
---|---|
private |
NamedQueueRecorder(org.apache.hadoop.conf.Configuration conf)
Initialize disruptor with configurable ringbuffer size
|
Modifier and Type | Method and Description |
---|---|
void |
addRecord(NamedQueuePayload namedQueuePayload)
Add various NamedQueue records to ringbuffer.
|
boolean |
clearNamedQueue(NamedQueuePayload.NamedQueueEvent namedQueueEvent)
clears queue records from ringbuffer
|
private int |
getEventCount(int eventCount) |
static NamedQueueRecorder |
getInstance(org.apache.hadoop.conf.Configuration conf) |
NamedQueueGetResponse |
getNamedQueueRecords(NamedQueueGetRequest request)
Retrieve in memory queue records from ringbuffer
|
void |
persistAll(NamedQueuePayload.NamedQueueEvent namedQueueEvent)
Add all in memory queue records to system table.
|
private final com.lmax.disruptor.dsl.Disruptor<RingBufferEnvelope> disruptor
private final LogEventHandler logEventHandler
private static NamedQueueRecorder namedQueueRecorder
private static boolean isInit
private NamedQueueRecorder(org.apache.hadoop.conf.Configuration conf)
public static NamedQueueRecorder getInstance(org.apache.hadoop.conf.Configuration conf)
private int getEventCount(int eventCount)
public NamedQueueGetResponse getNamedQueueRecords(NamedQueueGetRequest request)
request
- namedQueue request with event typepublic boolean clearNamedQueue(NamedQueuePayload.NamedQueueEvent namedQueueEvent)
namedQueueEvent
- type of queue to clearpublic void addRecord(NamedQueuePayload namedQueuePayload)
namedQueuePayload
- namedQueue payload sent by client of ring buffer servicepublic void persistAll(NamedQueuePayload.NamedQueueEvent namedQueueEvent)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.