T - the type parameter@ThreadSafe
public interface IMessageQueue<T>
| Modifier and Type | Method and Description |
|---|---|
T |
pull()
Pull message from the queue.
|
List<T> |
pull(List<T> l,
int maxElements)
Pull up to maxElements from queue.
|
List<T> |
pullAll(List<T> c)
Pull all current message on the queue.
|
int |
push(T content)
Push AisMessage onto the queue
|
int |
put(T content)
Push the specified element on the queue, waiting if necessary for space to become availably
|
int push(T content) throws MessageQueueOverflowException
content - the contentMessageQueueOverflowException - when capacity limit has been reachedint put(T content) throws InterruptedException
content - the contentInterruptedException - the interrupted exceptionT pull() throws InterruptedException
InterruptedException - the interrupted exceptionList<T> pull(List<T> l, int maxElements) throws InterruptedException
l - list to add elements tomaxElements - the max elementsInterruptedException - the interrupted exceptionList<T> pullAll(List<T> c) throws InterruptedException
c - the cInterruptedException - the interrupted exceptionCopyright © 2011–2019 Danish Maritime Authority. All rights reserved.