Assembly: soss_namedcache (in soss_namedcache.dll) Version: 22.214.171.124
public R Invoke<T, P, R>( IFilter filter, P param, Func<T, P, R> evalMethod, Func<R, R, R> mergeMethod, TimeSpan invokeTimeout )
Public Function Invoke(Of T, P, R) ( filter As IFilter, param As P, evalMethod As Func(Of T, P, R), mergeMethod As Func(Of R, R, R), invokeTimeout As TimeSpan ) As R
- Type: Soss.ClientIFilter
A StateServer IFilter specifying the subset of objects within this NamedCache to evaluate. Specify null if all objects within the NamedCache are to be evaluated.
an object to be passed to each evalMethod at evaluation time. param must be serializable and the assembly in which it is defined must be available on all StateServer hosts.
- Type: SystemFunc, ,
a delegate specifying the evaluation method to run for each target object specified via filter. The Type in which evalMethod is defined must be serializable. The result type, R, of evalMethod must also be serializable.
In this Invoke overload, the evalMethod is expected to take two arguments: an object of type T, referred to as the Target object and an object of type P which is the type of param.
- Type: SystemFunc, ,
the method to be run following execution of evalMethods. This method is intended to perform a pairwise merge on the result objects output from multiple invocations of evalMethod.
The mergeMethod accepts two arguments which must have the same type, R, as the result type of the evalMethod. The mergeMethod merges its arguments into a single result instance of type R.
- Type: SystemTimeSpan
The amount of time allowed for this Invoke operation. After the expires, the operation will be canceled. You may specify InfiniteInvokeTimeout if you want the operation to continue no matter how long it takes. However, temporary objects used while processing may accumulate if an error occurs and you specify InfiniteInvokeTimeout.
The value specified is currently adjusted up to the smallest number of seconds equal or greater than the TimeSpan value specified. This granularity may change in future implementations.
- the type of the Target object to be retrieved from StateServer and evaluated by the evalMethod. In order to be stored in StateServer, objects of type T must be serializable.
- the type of the Parameter object passed to each Eval method invocation. P must be serializable.
- the Type of the Results object returned from the evalMethod. Type R must be serializable.
the fully-merged result object after merging the result objects on each StateServer host and then merging the results from all hosts into a single object.
The method invocations will occur on all hosts in parallel. All method invocations on a given host will share a single instance of the parameter object param.
If each host does not already have an attached client that has the necessary dependencies to perform invocations for that host and is registered for events for that NamedCache, an invocation grid (IG) should be used to handle parallel method invocations. IGs can be configured and loaded by using InvocationGridBuilder. This starts a dedicated invocation worker client for each host in the store. After an IG is loaded, it can be assigned to this NamedCache through the InvocationGrid property.