IMapTKey, TValueTryRemove Method Hazelcast .Net Client Class Library
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.7.1
Syntax

bool TryRemove(
	TKey key,
	long timeout,
	TimeUnit timeunit
)

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: Boolean
true 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

Reference