Method Enqueue
Enqueue(T)
Adds an object to the end of the IQueue.
Declaration
void Enqueue(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The object to add to the IQueue. |
Examples
The following code sample shows how to to enqueue an object in Distributed Queue.
ICache cache = CacheManager.GetCache("demoClusteredCache");
string dataTypeName = "DistributedQueue";
IDistributedQueue<Product> queue = cache.DataTypeManager.GetQueue<Product>(dataTypeName);
Product product = new Product();
product.Id = 1;
product.Name = "Chai";
queue.Enqueue(product);