MultistreamConfig class
Configuration for multistream protocol operations
This class provides configuration options for multistream protocol negotiation, including timeout settings and retry behavior. Configuration for multistream protocol operations
Constructors
- MultistreamConfig.new({Duration readTimeout = defaultReadTimeout, int maxRetries = defaultMaxRetries, bool useProgressiveTimeout = true, Duration initialTimeout = defaultInitialTimeout, int maxTimeoutAttempts = defaultMaxTimeoutAttempts, double timeoutMultiplier = defaultTimeoutMultiplier, Duration retryDelay = const Duration(milliseconds: 100), bool enableTimeoutLogging = true})
-
Creates a new MultistreamConfig with the specified settings
const
- MultistreamConfig.failFast()
-
Creates a configuration with no retries (fail fast)
factory
- MultistreamConfig.fastNetwork()
-
Creates a configuration optimized for fast networks
factory
- MultistreamConfig.slowNetwork()
-
Creates a configuration optimized for slow/unreliable networks
factory
Properties
- enableTimeoutLogging → bool
-
Whether to enable detailed logging for timeout operations
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- initialTimeout → Duration
-
Initial timeout for progressive strategy
final
- maxRetries → int
-
Maximum number of retry attempts for transient failures
final
- maxTimeoutAttempts → int
-
Maximum number of timeout attempts in progressive strategy
final
- readTimeout → Duration
-
Timeout for individual read operations
final
- retryDelay → Duration
-
Delay between retry attempts
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeoutMultiplier → double
-
Multiplier for timeout duration in progressive strategy
final
- useProgressiveTimeout → bool
-
Whether to use progressive timeout strategy
final
Methods
-
copyWith(
{Duration? readTimeout, int? maxRetries, bool? useProgressiveTimeout, Duration? initialTimeout, int? maxTimeoutAttempts, double? timeoutMultiplier, Duration? retryDelay, bool? enableTimeoutLogging}) → MultistreamConfig - Creates a copy of this configuration with modified values
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- defaultInitialTimeout → const Duration
- Default progressive timeout strategy settings
- defaultMaxRetries → const int
- Default maximum number of retry attempts
- defaultMaxTimeoutAttempts → const int
- defaultReadTimeout → const Duration
- Default timeout for read operations
- defaultTimeoutMultiplier → const double