Click or drag to resize

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.2
Syntax
TValue Put(
	TKey key,
	TValue value,
	long ttl,
	TimeUnit timeunit
)

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: TValue
old 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