Class ForEachApiProcessor<TSossObject>
- Namespace
- Scaleout.Modules.Abstractions
- Assembly
- Scaleout.Modules.Abstractions.dll
Base class for implementing a foreach API processor for a specific SOSS object type.
public abstract class ForEachApiProcessor<TSossObject>
Type Parameters
TSossObjectType of the SOSS object.
- Inheritance
-
ForEachApiProcessor<TSossObject>
- Inherited Members
Remarks
Foreach API processors are used to perform parallel operations on all the SOSS objects in an API module, where each object is evaluated and then optionally updated or removed.
Methods
Evaluate(ApiProcessingContext<TSossObject>, TSossObject, byte[])
Evaluates a SOSS object and determines whether it should be updated, removed, or left unchanged in the ScaleOut service. This method is called for each SOSS object in the cache when the foreach API operation is invoked. Implementations of this method must be decorated with a SossEvalMethodAttribute attribute to indicate how locking should be handled for the SOSS object during evaluation.
public abstract ProcessingResult Evaluate(ApiProcessingContext<TSossObject> context, TSossObject sossObject, byte[] parameter)
Parameters
contextApiProcessingContext<TSossObject>The API processing context.
sossObjectTSossObjectThe SOSS object to evaluate.
parameterbyte[]The optional parameter for the API operation.
Returns
- ProcessingResult
A ProcessingResult indicating whether modifications to the
sossObjectshould be persisted or whether the object should be removed.