NamedCacheSingleObjectInvokeT, P, R Method (CachedObjectId, P, FuncT, P, R, TimeSpan)

ScaleOut Software NamedCache API
Invoke the user-defined method on the StateServer object identified by objectId within this NamedCache. The method invocation will be passed the parameter object param. The result returned from method is returned to the caller of this method.

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

public R SingleObjectInvoke<T, P, R>(
	CachedObjectId objectId,
	P param,
	Func<T, P, R> method,
	TimeSpan invokeTimeout
)

Parameters

objectId
Type: Soss.ClientCachedObjectId
A NamedCache objectId identifying the object to be retrieved from StateServer and supplied to method when it runs.
param
Type: P
an object to be passed to each method at evaluation time. param must be serializable and the assembly in which it is defined must be available on all StateServer hosts.
method
Type: SystemFuncT, P, R
a delegate specifying the method to run for the target object specified by objectId. The Type in which method is defined must be serializable.

In this Invoke overload, the method 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.

invokeTimeout
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 SingleObjectInvokeT, P, R(CachedObjectId, P, FuncT, P, R, TimeSpan) 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.

Type Parameters

T
the type of the Target object to be retrieved from StateServer and supplied to method when it runs. In order to be stored in StateServer, objects of type T must be serializable.
P
the type of the Parameter object passed to each Eval method invocation. P must be serializable.
R
The Type of the object returned from method. The type R must be serializable.

Return Value

Type: R
the value returned from method.
Remarks

The method invocation will occur at a host which currently has the object in its store.
See Also

Reference