Skip to content

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, IDisposable

objectEngineRuntime

IRuntime, IDisposable

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

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 class.

public EngineRuntime(IReadOnlyList<IModule> modules, RuntimeManifest manifest, FailurePolicy failurePolicy, IReadOnlyList<ExecutionGraphDescriptor>? executionGraphs = null, IReadOnlyList<HostedExecutionDescriptor>? hostedExecutions = null)

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.

Gets the failure policy that governs startup, stop, and restart behavior.

public FailurePolicy FailurePolicy { get; }

FailurePolicy

Gets the last captured lifecycle failure when one is available.

public RuntimeFailureInfo? LastFailure { get; }

RuntimeFailureInfo?

Gets the runtime manifest that describes the built runtime shape.

public RuntimeManifest Manifest { get; }

RuntimeManifest

Gets the modules that participate in runtime lifecycle transitions.

public IReadOnlyList<IModule> Modules { get; }

IReadOnlyList<IModule>

Gets the richer operator-facing lifecycle story for the runtime.

public RuntimeOperationalStory OperationalStory { get; }

RuntimeOperationalStory

Gets the number of completed manual restarts.

public int RestartCount { get; }

int

Gets the current lifecycle status.

public RuntimeStatus Status { get; }

RuntimeStatus

Gets a serialization-friendly snapshot of the current runtime status.

public RuntimeStatusSnapshot StatusSnapshot { get; }

RuntimeStatusSnapshot

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)

services IServiceProvider

The service provider bound to the runtime lifecycle.

cancellationToken CancellationToken

The cancellation token for the initialization operation.

Task

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)

services IServiceProvider

The service provider bound to the runtime lifecycle.

cancellationToken CancellationToken

The cancellation token for the restart operation.

Task

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)

services IServiceProvider

The service provider bound to the runtime lifecycle.

cancellationToken CancellationToken

The cancellation token for the startup operation.

Task

A task that completes when startup finishes.

Stops started modules and transitions the runtime to a stopped state.

public Task StopAsync(CancellationToken cancellationToken = default)

cancellationToken CancellationToken

The cancellation token for the stop operation.

Task

A task that completes when shutdown finishes.