Class ModulePackage
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
gridConnectionGridConnectionserviceProviderIServiceProviderhttpClientFactoryIHttpClientFactoryconfigurationIConfigurationloggerFactoryILoggerFactorymetricsManagerMetricsManager
Fields
RulesEngineCache
public readonly Cache<string, RuleBasedModelDefinition> RulesEngineCache
Field Value
- Cache<string, RuleBasedModelDefinition>
Properties
IsRulesBasedModel
public bool IsRulesBasedModel { get; set; }
Property Value
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
moduleNamestringName of the module.
optionsApiModuleOptions<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
TSossObjectType of object stored in the ScaleOut StateServer (SOSS) service.
TApiProcessorType 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
modelNamestringName of the model.
Type Parameters
TDigitalTwinModelType of the digital twin model (inherited from Scaleout.Modules.DigitalTwin.Abstractions.DigitalTwinBase<TDigitalTwin>).
TMessageProcessorType 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
moduleNamestringName of the module.
optionsMessageModuleOptions<TSossObject>Options for the message module.
Type Parameters
TSossObjectType of object stored in the ScaleOut StateServer (SOSS) service.
TMessageProcessorType 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
modelNamestringName of the model.
Type Parameters
TDigitalTwinModelType of the simulation model (inherited from Scaleout.Modules.DigitalTwin.Abstractions.DigitalTwinBase<TDigitalTwin>).
TSimulationProcessorType of the simulation processor (inherited from Scaleout.Modules.DigitalTwin.Abstractions.SimulationProcessor<TDigitalTwin>).
TMessageProcessorType of the message processor (inherited from Scaleout.Modules.DigitalTwin.Abstractions.MessageProcessor<TDigitalTwin>).
GetSossObjectPropertyInfo<TSossObject>()
public static Dictionary<string, string> GetSossObjectPropertyInfo<TSossObject>()
Returns
Type Parameters
TSossObject