IQueueT Interface |
Namespace: Hazelcast.Core
public interface IQueue<T> : IHCollection<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IDistributedObject
The IQueueT type exposes the following members.
Name | Description | |
---|---|---|
Count | Gets the number of elements contained in the ICollectionT. (Inherited from ICollectionT.) | |
IsReadOnly | Gets a value indicating whether the ICollectionT is read-only. (Inherited from ICollectionT.) |
Name | Description | |
---|---|---|
Add |
Adds the specified item.
(Inherited from IHCollectionT.) | |
AddAllTE |
Adds all.
(Inherited from IHCollectionT.) | |
AddItemListener | Adds an item listener for this collection. (Inherited from IHCollectionT.) | |
Clear | Removes all items from the ICollectionT. (Inherited from ICollectionT.) | |
Contains(T) | Determines whether the ICollectionT contains a specific value. (Inherited from ICollectionT.) | |
Contains(Object) | ||
ContainsAllTE |
Determines whether this collection contains all of the elements in the specified collection.
(Inherited from IHCollectionT.) | |
CopyTo | Copies the elements of the ICollectionT to an Array, starting at a particular Array index. (Inherited from ICollectionT.) | |
Destroy | Destroys this object cluster-wide. (Inherited from IDistributedObject.) | |
DrainToTE(ICollectionTE) |
Removes all available elements from this queue and adds them
to the given collection. This operation may be more
efficient than repeatedly polling this queue. A failure
encountered while attempting to add elements to
collection c may result in elements being in neither,
either or both collections when the associated exception is
thrown. Attempts to drain a queue to itself result in
IllegalArgumentException. Further, the behavior of
this operation is undefined if the specified collection is
modified while the operation is in progress.
| |
DrainToTE(ICollectionTE, Int32) |
Removes at most the given number of available elements from
this queue and adds them to the given collection. A failure
encountered while attempting to add elements to
collection c may result in elements being in neither,
either or both collections when the associated exception is
thrown. Attempts to drain a queue to itself result in
IllegalArgumentException. Further, the behavior of
this operation is undefined if the specified collection is
modified while the operation is in progress.
| |
Element |
Retrieves, but does not remove, the head of this queue. This method
differs from Peek only in that it throws an exception
if this queue is empty.
| |
GetEnumerator | Returns an enumerator that iterates through the collection. (Inherited from IEnumerableT.) | |
GetName | Returns the unique name for this IDistributedObject. (Inherited from IDistributedObject.) | |
GetPartitionKey | Returns the key of partition this IDistributedObject is assigned to. (Inherited from IDistributedObject.) | |
GetServiceName | Returns the service name for this object. (Inherited from IDistributedObject.) | |
IsEmpty |
Determines whether this instance is empty.
(Inherited from IHCollectionT.) | |
Offer(T) |
Inserts the specified element into this queue if it is possible to do
so immediately without violating capacity restrictions, returning
true upon success and false if no space is currently
available.
| |
Offer(T, Int64, TimeUnit) |
Inserts the specified element into this queue, waiting up to the
specified wait time if necessary for space to become available.
| |
Peek | ||
Poll |
Retrieves and removes the head of this queue,
or returns null if this queue is empty.
| |
Poll(Int64, TimeUnit) |
Retrieves and removes the head of this queue, waiting up to the
specified wait time if necessary for an element to become available.
| |
Put |
Inserts the specified element into this queue, waiting if necessary for space to become available.
| |
RemainingCapacity |
Returns the number of additional elements that this queue can ideally
(in the absence of memory or resource constraints) accept without
blocking, or Int64.MaxValue if there is no intrinsic
limit.
Note that you cannot always tell if an attempt to insert an element will succeed by inspecting remainingCapacity because it may be the case that another thread is about to insert or remove an element. | |
Remove |
Retrieves and removes the head of this queue. This method differs
from Poll only in that it throws an exception if this
queue is empty.
| |
Remove(T) | Removes the first occurrence of a specific object from the ICollectionT. (Inherited from ICollectionT.) | |
Remove(Object) |
Removes a single instance of the specified element from this queue, if it is present
| |
RemoveAllTE |
Removes all of the elements in the specified collection from this collection.
(Inherited from IHCollectionT.) | |
RemoveItemListener | Removes the specified item listener. (Inherited from IHCollectionT.) | |
RetainAllTE |
Retains only the elements in this collection that are contained in the specified collection (optional operation).
(Inherited from IHCollectionT.) | |
Size |
Gets the number of elements contained in the collection.
(Inherited from IHCollectionT.) | |
Take |
Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.
| |
ToArray |
Returns an array containing all of the elements in this collection.
(Inherited from IHCollectionT.) | |
ToArrayTE(TE) |
Returns an array containing all of the elements in this collection
the runtime type of the returned array is that of the specified array
(Inherited from IHCollectionT.) |