| IMapTKey, TValueTryRemove Method |
Tries to remove the entry with the given key from this map
within specified timeout value.
Namespace:
Hazelcast.Core
Assembly:
Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.12.3
Syntax bool TryRemove(
TKey key,
long timeout,
TimeUnit timeunit
)
Function TryRemove (
key As TKey,
timeout As Long,
timeunit As TimeUnit
) As Boolean
bool TryRemove(
TKey key,
long long timeout,
TimeUnit timeunit
)
abstract TryRemove :
key : 'TKey *
timeout : int64 *
timeunit : TimeUnit -> bool
Parameters
- key
- Type: TKey
key of the entry - timeout
- Type: SystemInt64
maximum time to wait for acquiring the lock for the key - timeunit
- Type: Hazelcast.CoreTimeUnit
TimeUnit for the ttl
Return Value
Type:
Booleantrue if the remove is successful,
false otherwise.
Remarks
Tries to remove the entry with the given key from this map
within specified timeout value. If the key is already locked by another
thread and/or member, then this operation will wait timeout
amount for acquiring the lock.
Warning:
This method uses
GetHashCode and
Equals of binary form of
the
key, not the actual implementations of
GetHashCode and
Equals
defined in
key's class.
Warning-2:
This method returns a clone of previous value, not the original (identically equal) value
previously put into map.
See Also