Class StateStore.Service
- Namespace
- Azure.Iot.Operations.Services.StateStore.StateStore
- Assembly
- Azure.Iot.Operations.Services.dll
public abstract class StateStore.Service : IAsyncDisposable
- Inheritance
-
StateStore.Service
- Implements
- Inherited Members
Constructors
Service(ApplicationContext, IMqttPubSubClient, Dictionary<string, string>?)
Construct a new instance of this service.
public Service(ApplicationContext applicationContext, IMqttPubSubClient mqttClient, Dictionary<string, string>? topicTokenMap = null)
Parameters
applicationContextApplicationContextThe shared context for your application.
mqttClientIMqttPubSubClientThe MQTT client to use.
topicTokenMapDictionary<string, string>The topic token replacement map to use for all operations by default. Generally, this will include the token values for topic tokens such as "modelId" which should be the same for the duration of this service's lifetime. Note that additional topic tokens can be specified per-telemetry message.
Properties
InvokeCommandExecutor
public StateStore.InvokeCommandExecutor InvokeCommandExecutor { get; }
Property Value
Methods
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
public ValueTask DisposeAsync()
Returns
- ValueTask
A task that represents the asynchronous dispose operation.
DisposeAsync(bool)
public ValueTask DisposeAsync(bool disposing)
Parameters
disposingbool
Returns
InvokeAsync(byte[], CommandRequestMetadata, CancellationToken)
public abstract Task<ExtendedResponse<byte[]>> InvokeAsync(byte[] request, CommandRequestMetadata requestMetadata, CancellationToken cancellationToken)
Parameters
requestbyte[]requestMetadataCommandRequestMetadatacancellationTokenCancellationToken
Returns
- Task<ExtendedResponse<byte[]>>
StartAsync(int?, CancellationToken)
Begin accepting command invocations for all command executors.
public Task StartAsync(int? preferredDispatchConcurrency = null, CancellationToken cancellationToken = default)
Parameters
preferredDispatchConcurrencyint?The dispatch concurrency count for the command response cache to use.
cancellationTokenCancellationTokenCancellation token.
Returns
StopAsync(CancellationToken)
public Task StopAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken