NamedMapInvokableTKey, TValue, TParam, TResult Constructor (FuncTKey, TValue, TParam, TResult, FuncTResult, TResult, TParam, TResult)

ScaleOut Software NamedCache API
Public constructor, where the caller has to pass both the Eval and Merge delegates. The default BinaryFormatter serializer will be used for parameter and result objects.

Namespace:  Soss.Client.Concurrent
Assembly:  soss_namedcache (in soss_namedcache.dll) Version: 6.2.0.0
Syntax

public NamedMapInvokable(
	Func<TKey, TValue, TParam, TResult> Eval,
	Func<TResult, TResult, TParam, TResult> Merge
)

Parameters

Eval
Type: SystemFuncTKey, TValue, TParam, TResult
The delegate that represents the code to be executed on each node. in parallel for each key/value pair locally stored on the node.
Merge
Type: SystemFuncTResult, TResult, TParam, TResult
The delegate that represents the code for merging two invocation results into one.
Remarks

The Eval method should be defined as following: TResult Eval(TKey key, TValue value, TParam parameter), where: - the key parameter is a key to be evaluated (type of TKey); - the value parameter is a value for each key (type of TValue); - the parameter is an optional parameter (type of TParam) that can be passed in for each evaluation.

The Merge method should be defined as following: TResult Eval(TKey key, TValue value, TParam parameter), where: TResult Merge(TResult firstResult, TResult secondResult, TParam parameter), where - the firstResult parameter is the result of one Eval method call to merge. - the secondResult parameter is the result of another Eval method call to merge. - the parameter argument is an optional parameter that can be passed in for each merge operation.

If the result objects are mutable, modifying and returning one of the provided results as a merged result can improve performance and memory efficiency by eliminating the need to allocate a new result object for each merge.

See Also

Reference