public interface QueueCodecTemplate
Modifier and Type | Method and Description |
---|---|
Object |
addAll(String name,
List<Data> dataList)
Adds all of the elements in the specified collection to this collection (optional operation).The behavior of this
operation is undefined if the specified collection is modified while the operation is in progress.
|
Object |
addListener(String name,
boolean includeValue,
boolean localOnly)
Adds an listener for this collection.
|
void |
clear(String name)
Removes all of the elements from this collection (optional operation).
|
Object |
compareAndRemoveAll(String name,
List<Data> dataList)
Removes all of this collection's elements that are also contained in the specified collection (optional operation).
|
Object |
compareAndRetainAll(String name,
List<Data> dataList)
Retains only the elements in this collection that are contained in the specified collection (optional operation).
|
Object |
contains(String name,
Data value)
Returns true if this queue contains the specified element.
|
Object |
containsAll(String name,
List<Data> dataList)
Return true if this collection contains all of the elements in the specified collection.
|
Object |
drainTo(String name)
Removes all available elements from this queue and adds them to the given collection.
|
Object |
drainToMaxSize(String name,
int maxSize)
Removes at most the given number of available elements from this queue and adds them to the given collection.
|
Object |
isEmpty(String name)
Returns true if this collection contains no elements.
|
Object |
iterator(String name)
Returns an iterator over the elements in this collection.
|
Object |
offer(String name,
Data value,
long timeoutMillis)
Inserts the specified element into this queue, waiting up to the specified wait time if necessary for space to
become available.
|
Object |
peek(String name)
Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.
|
Object |
poll(String name,
long timeoutMillis)
Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element
to become available.
|
void |
put(String name,
Data value)
Inserts the specified element into this queue, waiting if necessary for space to become available.
|
Object |
remainingCapacity(String name)
Returns the number of additional elements that this queue can ideally (in the absence of memory or resource
constraints) accept without blocking, or Integer.MAX_VALUE if there is no intrinsic limit.
|
Object |
remove(String name,
Data value)
Retrieves and removes the head of this queue.
|
Object |
removeListener(String name,
String registrationId)
Removes the specified item listener.Returns silently if the specified listener was not added before.
|
Object |
size(String name)
Returns the number of elements in this collection.
|
Object |
take(String name)
Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.
|
Object offer(String name, Data value, long timeoutMillis)
name
- Name of the Queuevalue
- The element to addtimeoutMillis
- Maximum time in milliseconds to wait for acquiring the lock for the key.void put(String name, Data value)
name
- Name of the Queuevalue
- The element to addObject size(String name)
name
- Name of the QueueObject remove(String name, Data value)
name
- Name of the Queuevalue
- Element to be removed from this queue, if presentObject poll(String name, long timeoutMillis)
name
- Name of the QueuetimeoutMillis
- Maximum time in milliseconds to wait for acquiring the lock for the key.Object take(String name)
name
- Name of the QueueObject peek(String name)
name
- Name of the QueueObject iterator(String name)
name
- Name of the QueueObject drainTo(String name)
name
- Name of the QueueObject drainToMaxSize(String name, int maxSize)
name
- Name of the QueuemaxSize
- The maximum number of elements to transferObject contains(String name, Data value)
name
- Name of the Queuevalue
- Element whose presence in this collection is to be testedObject containsAll(String name, List<Data> dataList)
name
- Name of the QueuedataList
- Collection to be checked for containment in this collectionObject compareAndRemoveAll(String name, List<Data> dataList)
name
- Name of the QueuedataList
- Collection containing elements to be removed from this collectionObject compareAndRetainAll(String name, List<Data> dataList)
name
- Name of the QueuedataList
- collection containing elements to be retained in this collectionvoid clear(String name)
name
- Name of the QueueObject addAll(String name, List<Data> dataList)
name
- Name of the QueuedataList
- Collection containing elements to be added to this collectionObject addListener(String name, boolean includeValue, boolean localOnly)
name
- Name of the QueueincludeValue
- true if the updated item should be passed to the item listener, false otherwise.localOnly
- if true fires events that originated from this node only, otherwise fires all eventsObject removeListener(String name, String registrationId)
name
- Name of the QueueregistrationId
- Id of the listener registration.Object remainingCapacity(String name)
name
- Name of the QueueCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.