Class EngineRuntime
Namespace: Cephalon.Engine.Runtime
Assembly: Cephalon.Engine.dll
Executes module lifecycle transitions and exposes runtime status, manifest, and failure information.
public sealed class EngineRuntime : IRuntime, IDisposableInheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”EngineRuntime(IReadOnlyList<IModule>, RuntimeManifest, FailurePolicy, IReadOnlyList<ExecutionGraphDescriptor>?, IReadOnlyList<HostedExecutionDescriptor>?)
Section titled “ EngineRuntime(IReadOnlyList<IModule>, RuntimeManifest, FailurePolicy, IReadOnlyList<ExecutionGraphDescriptor>?, IReadOnlyList<HostedExecutionDescriptor>?)”Initializes a new instance of the
public EngineRuntime(IReadOnlyList<IModule> modules, RuntimeManifest manifest, FailurePolicy failurePolicy, IReadOnlyList<ExecutionGraphDescriptor>? executionGraphs = null, IReadOnlyList<HostedExecutionDescriptor>? hostedExecutions = null)Parameters
Section titled “Parameters”modules IReadOnlyList<IModule>
The modules that participate in runtime lifecycle transitions.
manifest RuntimeManifest
The runtime manifest that describes the built runtime shape.
failurePolicy FailurePolicy
The failure policy that governs startup, stop, and restart behavior.
executionGraphs IReadOnlyList<ExecutionGraphDescriptor>?
The execution graphs visible to the runtime story and diagnostics surface.
hostedExecutions IReadOnlyList<HostedExecutionDescriptor>?
The hosted executions visible to the runtime story and operator-facing introspection surfaces.
Properties
Section titled “Properties”FailurePolicy
Section titled “ FailurePolicy”Gets the failure policy that governs startup, stop, and restart behavior.
public FailurePolicy FailurePolicy { get; }Property Value
Section titled “Property Value”LastFailure
Section titled “ LastFailure”Gets the last captured lifecycle failure when one is available.
public RuntimeFailureInfo? LastFailure { get; }Property Value
Section titled “Property Value”Manifest
Section titled “ Manifest”Gets the runtime manifest that describes the built runtime shape.
public RuntimeManifest Manifest { get; }Property Value
Section titled “Property Value”Modules
Section titled “ Modules”Gets the modules that participate in runtime lifecycle transitions.
public IReadOnlyList<IModule> Modules { get; }Property Value
Section titled “Property Value”IReadOnlyList<IModule>
OperationalStory
Section titled “ OperationalStory”Gets the richer operator-facing lifecycle story for the runtime.
public RuntimeOperationalStory OperationalStory { get; }Property Value
Section titled “Property Value”RestartCount
Section titled “ RestartCount”Gets the number of completed manual restarts.
public int RestartCount { get; }Property Value
Section titled “Property Value”Status
Section titled “ Status”Gets the current lifecycle status.
public RuntimeStatus Status { get; }Property Value
Section titled “Property Value”StatusSnapshot
Section titled “ StatusSnapshot”Gets a serialization-friendly snapshot of the current runtime status.
public RuntimeStatusSnapshot StatusSnapshot { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Dispose()
Section titled “ Dispose()”Releases runtime resources.
public void Dispose()InitializeAsync(IServiceProvider, CancellationToken)
Section titled “ InitializeAsync(IServiceProvider, CancellationToken)”Initializes the runtime and its modules.
public Task InitializeAsync(IServiceProvider services, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”services IServiceProvider
The service provider bound to the runtime lifecycle.
cancellationToken CancellationToken
The cancellation token for the initialization operation.
Returns
Section titled “Returns”A task that completes when initialization finishes.
RestartAsync(IServiceProvider, CancellationToken)
Section titled “ RestartAsync(IServiceProvider, CancellationToken)”Restarts the runtime when the current failure policy allows it.
public Task RestartAsync(IServiceProvider services, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”services IServiceProvider
The service provider bound to the runtime lifecycle.
cancellationToken CancellationToken
The cancellation token for the restart operation.
Returns
Section titled “Returns”A task that completes when the restart finishes.
StartAsync(IServiceProvider, CancellationToken)
Section titled “ StartAsync(IServiceProvider, CancellationToken)”Starts the runtime and its modules.
public Task StartAsync(IServiceProvider services, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”services IServiceProvider
The service provider bound to the runtime lifecycle.
cancellationToken CancellationToken
The cancellation token for the startup operation.
Returns
Section titled “Returns”A task that completes when startup finishes.
StopAsync(CancellationToken)
Section titled “ StopAsync(CancellationToken)”Stops started modules and transitions the runtime to a stopped state.
public Task StopAsync(CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”cancellationToken CancellationToken
The cancellation token for the stop operation.
Returns
Section titled “Returns”A task that completes when shutdown finishes.