Table of Contents

Interface ITimePolicy

Namespace
Excalibur.Dispatch
Assembly
Excalibur.Dispatch.Abstractions.dll

Defines time-based policies for message processing timeouts and scheduling. Configurable timeout handling with proper error management.

public interface ITimePolicy
Extension Methods

Properties

DefaultTimeout

Gets the default timeout for message processing operations.

TimeSpan DefaultTimeout { get; }

Property Value

TimeSpan

The default timeout for message processing operations.

HandlerTimeout

Gets the timeout for handler execution.

TimeSpan HandlerTimeout { get; }

Property Value

TimeSpan

The handler execution timeout.

MaxTimeout

Gets the maximum allowed timeout for any operation.

TimeSpan MaxTimeout { get; }

Property Value

TimeSpan

The maximum timeout allowed.

Methods

CreateTimeoutToken(TimeoutOperationType, CancellationToken)

Creates a cancellation token with the appropriate timeout for an operation.

CancellationToken CreateTimeoutToken(TimeoutOperationType operationType, CancellationToken parentToken)

Parameters

operationType TimeoutOperationType

The type of operation being performed.

parentToken CancellationToken

Optional parent cancellation token to link with.

Returns

CancellationToken

A cancellation token with the configured timeout.

GetTimeoutFor(TimeoutOperationType)

Determines the appropriate timeout for a specific operation type.

TimeSpan GetTimeoutFor(TimeoutOperationType operationType)

Parameters

operationType TimeoutOperationType

The type of operation being performed.

Returns

TimeSpan

The timeout duration for the operation.