Table of Contents

Class ModulePackage

Namespace
Scaleout.Modules.Hosting
Assembly
Scaleout.Modules.Hosting.dll

Allows modules to be added to a ScaleOut Active Caching package during startup.

public class ModulePackage
Inheritance
ModulePackage
Inherited Members

Remarks

Use AddApiModule<TSossObject, TApiProcessor>(string, ApiModuleOptions<TSossObject>?) and/or AddMsgModule<TSossObject, TMessageProcessor>(string, MessageModuleOptions<TSossObject>?)"/> in your package's Startup.cs file to add API and/or message processing modules to your package.

Constructors

ModulePackage(GridConnection, IServiceProvider, IHttpClientFactory, IConfiguration, ILoggerFactory?, MetricsManager)

public ModulePackage(GridConnection gridConnection, IServiceProvider serviceProvider, IHttpClientFactory httpClientFactory, IConfiguration configuration, ILoggerFactory? loggerFactory, MetricsManager metricsManager)

Parameters

gridConnection GridConnection
serviceProvider IServiceProvider
httpClientFactory IHttpClientFactory
configuration IConfiguration
loggerFactory ILoggerFactory
metricsManager MetricsManager

Fields

RulesEngineCache

public readonly Cache<string, RuleBasedModelDefinition> RulesEngineCache

Field Value

Cache<string, RuleBasedModelDefinition>

Properties

IsRulesBasedModel

public bool IsRulesBasedModel { get; set; }

Property Value

bool

Methods

AddApiModule<TSossObject, TApiProcessor>(string, ApiModuleOptions<TSossObject>?)

Adds an API module to the package.

public ApiModuleRegistration<TSossObject> AddApiModule<TSossObject, TApiProcessor>(string moduleName, ApiModuleOptions<TSossObject>? options = null) where TApiProcessor : ApiProcessor<TSossObject>

Parameters

moduleName string

Name of the module.

options ApiModuleOptions<TSossObject>

Options for configuring the API module.

Returns

ApiModuleRegistration<TSossObject>

An ApiModuleRegistration<TSossObject> representing the registered API module, which can be use to register parallel operations on the objects in the module.

Type Parameters

TSossObject

Type of object stored in the ScaleOut StateServer (SOSS) service.

TApiProcessor

Type of API processor implementation (inherited from ApiProcessor<TSossObject>.

AddDigitalTwinModule<TDigitalTwinModel, TMessageProcessor>(string)

Adds a digital twin module to the package.

public void AddDigitalTwinModule<TDigitalTwinModel, TMessageProcessor>(string modelName) where TDigitalTwinModel : DigitalTwinBase<TDigitalTwinModel>, new() where TMessageProcessor : MessageProcessor<TDigitalTwinModel>

Parameters

modelName string

Name of the model.

Type Parameters

TDigitalTwinModel

Type of the digital twin model (inherited from Scaleout.Modules.DigitalTwin.Abstractions.DigitalTwinBase<TDigitalTwin>).

TMessageProcessor

Type of the message processor (inherited from Scaleout.Modules.DigitalTwin.Abstractions.MessageProcessor<TDigitalTwin>).

AddMsgModule<TSossObject, TMessageProcessor>(string, MessageModuleOptions<TSossObject>?)

Adds a message processing module to the package.

public void AddMsgModule<TSossObject, TMessageProcessor>(string moduleName, MessageModuleOptions<TSossObject>? options = null) where TMessageProcessor : MessageProcessor<TSossObject>

Parameters

moduleName string

Name of the module.

options MessageModuleOptions<TSossObject>

Options for the message module.

Type Parameters

TSossObject

Type of object stored in the ScaleOut StateServer (SOSS) service.

TMessageProcessor

Type of the message processor implementation (inherited from MessageProcessor<TSossObject>).

AddSimulationModule<TDigitalTwinModel, TSimulationProcessor, TMessageProcessor>(string)

Adds a simulation module to the package.

public void AddSimulationModule<TDigitalTwinModel, TSimulationProcessor, TMessageProcessor>(string modelName) where TDigitalTwinModel : DigitalTwinBase<TDigitalTwinModel>, new() where TSimulationProcessor : SimulationProcessor<TDigitalTwinModel> where TMessageProcessor : MessageProcessor<TDigitalTwinModel>

Parameters

modelName string

Name of the model.

Type Parameters

TDigitalTwinModel

Type of the simulation model (inherited from Scaleout.Modules.DigitalTwin.Abstractions.DigitalTwinBase<TDigitalTwin>).

TSimulationProcessor

Type of the simulation processor (inherited from Scaleout.Modules.DigitalTwin.Abstractions.SimulationProcessor<TDigitalTwin>).

TMessageProcessor

Type of the message processor (inherited from Scaleout.Modules.DigitalTwin.Abstractions.MessageProcessor<TDigitalTwin>).

GetSossObjectPropertyInfo<TSossObject>()

public static Dictionary<string, string> GetSossObjectPropertyInfo<TSossObject>()

Returns

Dictionary<string, string>

Type Parameters

TSossObject