| IReplicatedMapTKey, TValuePut Method (TKey, TValue, Int64, TimeUnit) |
Associates a given value to the specified key and replicates it to the
cluster. If there is an old value, it will be replaced by the specified
one and returned from the call.
Namespace:
Hazelcast.Core
Assembly:
Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.12.3
Syntax TValue Put(
TKey key,
TValue value,
long ttl,
TimeUnit timeunit
)
Function Put (
key As TKey,
value As TValue,
ttl As Long,
timeunit As TimeUnit
) As TValue
TValue Put(
TKey key,
TValue value,
long long ttl,
TimeUnit timeunit
)
abstract Put :
key : 'TKey *
value : 'TValue *
ttl : int64 *
timeunit : TimeUnit -> 'TValue
Parameters
- key
- Type: TKey
key with which the specified value is to be associated. - value
- Type: TValue
value to be associated with the specified key. - ttl
- Type: SystemInt64
ttl to be associated with the specified key-value pair. - timeunit
- Type: Hazelcast.CoreTimeUnit
TimeUnit to be used for the ttl value.
Return Value
Type:
TValueold value of the entry
Remarks
In addition, you have to specify a ttl and its
TimeUnit
to define when the value is outdated and thus should be removed from the
replicated map.
See Also