![](../icons/Hazelcast-IMDG-Logo-Orange_Dark_200px.jpg) | IQueueTOffer Method (T, Int64, TimeUnit) |
Inserts the specified element into this queue, waiting up to the
specified wait time if necessary for space to become available.
Namespace:
Hazelcast.Core
Assembly:
Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.9.4
Syntaxbool Offer(
T e,
long timeout,
TimeUnit unit
)
Function Offer (
e As T,
timeout As Long,
unit As TimeUnit
) As Boolean
bool Offer(
T e,
long long timeout,
TimeUnit unit
)
abstract Offer :
e : 'T *
timeout : int64 *
unit : TimeUnit -> bool
Parameters
- e
- Type: T
the element to add - timeout
- Type: SystemInt64
how long to wait before giving up, in units of
unit - unit
- Type: Hazelcast.CoreTimeUnit
a TimeUnit determining how to interpret the
timeout parameter
Return Value
Type:
Booleantrue if successful, or
false if
the specified waiting time elapses before space is available
ExceptionsException | Condition |
---|
Exception | if interrupted while waiting |
Remarks
Inserts the specified element into this queue, waiting up to the
specified wait time if necessary for space to become available.
See Also