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<org.openksavi.sponge.event.Event> |
createBlockingQueue() |
org.openksavi.sponge.event.Event |
get(long timeout)
Returns the first event from the queue.
|
int |
getSize()
Returns the current size of the queue.
|
void |
put(org.openksavi.sponge.event.Event event)
Puts a new event into the event queue.
|
getCapacity, setCapacitydoShutdown, doStartup, getEngine, getName, getService, getState, isFailed, isNew, isNewOrStartingOrRunning, isRunning, isStarting, isStopping, isTerminated, setEngine, setName, shutdown, startup, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitprotected static final int QUEUE_INITIAL_CAPACITY
public PriorityEventQueue(String name)
name - queue name.protected BlockingQueue<org.openksavi.sponge.event.Event> createBlockingQueue()
public void put(org.openksavi.sponge.event.Event event)
throws org.openksavi.sponge.engine.QueueFullException
event - a new event.org.openksavi.sponge.engine.QueueFullException - when the queue is full.public org.openksavi.sponge.event.Event get(long timeout)
throws InterruptedException
InterruptedExceptionpublic int getSize()
public void clear()
Copyright © 2016–2017 Softelnet. All rights reserved.