@ThreadSafe public class SbcEventQueue extends Object
Constructor and Description |
---|
SbcEventQueue(DataBalancerMetricsRegistry metricsRegistry)
Create the SbcEventQueue.
|
Modifier and Type | Method and Description |
---|---|
void |
enqueue(SbcEvent event)
Enqueue an event for processing on the EventQueue thread.
|
void |
prepend(SbcEvent event)
Prepend an event to the front of the SBC EventQueue.
|
void |
shutdownQueue()
Synchronously shutdown the SBC event queue.
|
public SbcEventQueue(DataBalancerMetricsRegistry metricsRegistry)
public void enqueue(SbcEvent event)
event
- SbcEvent to execute in the context of the EventQueue thread.IllegalStateException
- if the event queue has been shutdown.public void prepend(SbcEvent event)
enqueue(SbcEvent)
, but instead should be used for newly-awakened events that
had been waiting (see KAFKALESS-1106 for more details on why this is useful).event
- SbcEvent to execute in the context of the EventQueue thread.IllegalStateException
- if the event queue has been shutdown.public void shutdownQueue() throws InterruptedException
InterruptedException