public class MemoryEventQueue extends Object implements EventQueue
EventQueue.EventQueueElement
Constructor and Description |
---|
MemoryEventQueue() |
Modifier and Type | Method and Description |
---|---|
void |
add(Event e)
Add event to queue
|
void |
clear()
Clear the events queue
|
int |
getBatchSize()
Get the batch size used during polling events
|
void |
init(org.apache.hadoop.conf.Configuration conf)
Initialize the event queue
|
boolean |
isEmpty()
Find out if queue is empty
|
Event |
peek()
Read topmost event from queue but do not pop from it
|
Event |
poll()
Fetch single event from queue
|
List<Event> |
pollBatch()
Fetch events from queue in batch
|
int |
size()
Get current queue size
|
public MemoryEventQueue()
public void init(org.apache.hadoop.conf.Configuration conf)
EventQueue
init
in interface EventQueue
public int getBatchSize()
EventQueue
getBatchSize
in interface EventQueue
public void add(Event e)
EventQueue
add
in interface EventQueue
public List<Event> pollBatch()
EventQueue
pollBatch
in interface EventQueue
public Event poll()
EventQueue
poll
in interface EventQueue
public boolean isEmpty()
EventQueue
isEmpty
in interface EventQueue
public int size()
EventQueue
size
in interface EventQueue
public Event peek()
EventQueue
peek
in interface EventQueue
public void clear()
EventQueue
clear
in interface EventQueue
Copyright © 2018 Apache Software Foundation. All rights reserved.