Method DequeueBulk
DequeueBulk(Int32)
Removes and returns a list of objects at the beginning of the IQueue.
Declaration
IList<T> DequeueBulk(int maxitems = 10)
Parameters
Type | Name | Description |
---|---|---|
System. |
maxitems | The maximum number of items to remove from the IQueue. |
Returns
Type | Description |
---|---|
System. |
The list of objects that are removed from the beginning of the IQueue. |
Examples
The following code sample shows how to dequeue a list of objects from Distributed Queue.
ICache cache = CacheManager.GetCache("demoClusteredCache");
string dataTypeName = "DistributedQueue";
IDistributedQueue<Product> queue = cache.DataTypeManager.GetQueue<Product>(dataTypeName);
IList<Product> product = queue.DequeueBulk();