public class PriorityEventQueue extends BaseEventQueue
| Modifier and Type | Field and Description |
|---|---|
protected static int |
QUEUE_INITIAL_CAPACITY |
capacity| Constructor and Description |
|---|
PriorityEventQueue(String name)
Creates a new priority event queue.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears this event queue.
|
protected BlockingQueue<Event> |
createBlockingQueue() |
Event |
get(long timeout)
Returns the first event from the queue.
|
int |
getSize()
Returns the current size of the queue.
|
void |
put(Event event)
Puts a new event into the event queue.
|
getCapacity, setCapacitydoShutdown, doStartup, getDescription, getEngine, getInternalService, getLabel, getName, getState, isFailed, isNew, isNewOrStartingOrRunning, isRunning, isStarting, isStopping, isTerminated, setDescription, setEngine, setLabel, setName, shutdown, startup, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNameisFailed, isNew, isRunning, isStarting, isStopping, isTerminated, shutdown, startupgetDescription, getLabel, setDescription, setLabel, setNameprotected static final int QUEUE_INITIAL_CAPACITY
public PriorityEventQueue(String name)
name - queue name.protected BlockingQueue<Event> createBlockingQueue()
public void put(Event event) throws QueueFullException
event - a new event.QueueFullException - when the queue is full.public Event get(long timeout) throws InterruptedException
InterruptedExceptionpublic int getSize()
public void clear()
Copyright © 2016–2019 Softelnet. All rights reserved.