| IQueueTDrainToTE Method (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.
Namespace:
Hazelcast.Core
Assembly:
Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.12.3
Syntax int DrainTo<TE>(
ICollection<TE> c,
int maxElements
)
where TE : T
Function DrainTo(Of TE As T) (
c As ICollection(Of TE),
maxElements As Integer
) As Integer
generic<typename TE>
where TE : T
int DrainTo(
ICollection<TE>^ c,
int maxElements
)
abstract DrainTo :
c : ICollection<'TE> *
maxElements : int -> int when 'TE : 'T
Parameters
- c
- Type: System.Collections.GenericICollectionTE
the collection to transfer elements into - maxElements
- Type: SystemInt32
the maximum number of elements to transfer
Type Parameters
- TE
- type of elements
Return Value
Type:
Int32the number of elements transferred
See Also