Assembly: soss_namedcache (in soss_namedcache.dll) Version: 22.214.171.124
public void Invoke<T, P>( IFilter filter, P param, Action<T, P> evalMethod, TimeSpan invokeTimeout )
Public Sub Invoke(Of T, P) ( filter As IFilter, param As P, evalMethod As Action(Of T, P), invokeTimeout As TimeSpan )
- Type: Soss.ClientIFilter
A StateServer IFilter specifying the subset of objects within this NamedCache to evaluate. Specify null if all objects within this 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: SystemAction,
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.
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: 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 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.