IQueueTDrainToTE Method (ICollectionTE)Hazelcast .Net Client Class Library
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.

Namespace: Hazelcast.Core
Assembly: Hazelcast.Net (in Hazelcast.Net.dll) Version:

int DrainTo<TE>(
	ICollection<TE> c
where TE : T


Type: System.Collections.GenericICollectionTE
the collection to transfer elements into

Type Parameters

type of elements

Return Value

Type: Int32
the number of elements transferred
See Also