E
- the type of element to be stored in this queue.public interface WriteBehindQueue<E>
filter(IPredicate, Collection)
Modifier and Type | Method and Description |
---|---|
void |
addFirst(Collection<E> collection)
Inserts collection of elements to the front of this queue.
|
void |
addLast(E e)
Inserts to the end of this queue.
|
List<E> |
asList()
Returns a read-only list representation of this queue.
|
void |
clear()
Removes all of the elements in this
WriteBehindQueue
Queue will be empty after this method returns. |
boolean |
contains(E e)
Checks whether an element exist in this queue.
|
int |
drainTo(Collection<E> collection)
Removes all elements from this queue and adds them to the given collection.
|
void |
filter(IPredicate<E> predicate,
Collection<E> collection)
Filters this queue according to supplied predicate.
|
E |
peek()
Retrieves, but does not remove, the head of this queue,
or returns
null if this queue is empty. |
boolean |
removeFirstOccurrence(E e)
Removes the first occurrence of the specified element in this queue
when searching it by starting from the head of this queue.
|
int |
size()
Returns the number of elements in this
WriteBehindQueue . |
void addFirst(Collection<E> collection)
collection
- collection of elements to be inserted in front of this queue.void addLast(E e)
e
- element to be offeredE peek()
null
if this queue is empty.null
if this queue is emptyboolean removeFirstOccurrence(E e)
e
- element to be removed.true
if removed successfully, false
otherwiseint drainTo(Collection<E> collection)
collection
- all elements to be added to this collection.boolean contains(E e)
e
- item to be checkedtrue
if exists, false
otherwiseint size()
WriteBehindQueue
.WriteBehindQueue
.void clear()
WriteBehindQueue
Queue will be empty after this method returns.List<E> asList()
void filter(IPredicate<E> predicate, Collection<E> collection)
predicate
- used to filter this queuecollection
- filtered entries will be added to this collectionCopyright © 2022 Hazelcast, Inc.. All Rights Reserved.