Table of Contents

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

TSossObject

Type 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

context ApiProcessingContext<TSossObject>

The API processing context.

sossObject TSossObject

The SOSS object to evaluate.

parameter byte[]

The optional parameter for the API operation.

Returns

ProcessingResult

A ProcessingResult indicating whether modifications to the sossObject should be persisted or whether the object should be removed.

Remarks

NoUpdate can be returned to indicate that the sossObject instance was not modified and does not need to be updated in the ScaleOut service. NoUpdate should not be returned if the object was modified in any way. If you are unsure of whether the sossObject was modified, return DoUpdate.