TimeProviderNames
Namespace: Orleans.Runtime
System.TimeProvider instances from dependency injection for the areas owned by the Orleans core runtime. Individual extension packages (reminders, streaming, transactions, durable jobs, journaling, and similar) define their own keys in the corresponding package. public static class TimeProviderNamesRemarks
Orleans resolves time from a single default System.TimeProvider registration. To allow individual subsystems to be driven by different clocks, each area also resolves a keyedSystem.TimeProvider using one of these keys. A catch-all Microsoft.Extensions.DependencyInjection.KeyedService.AnyKey registration resolves every key to the unkeyed default provider, so behavior is unchanged unless a specific area is overridden.
This is primarily useful for testing: a test can install a controllable clock (such as Microsoft.Extensions.Time.Testing.FakeTimeProvider) as the default provider to drive grain timers and grain-facing delays deterministically, while pinning the silo''s background maintenance timers to real time so that advancing the fake clock does not resume those loops inline.
Fields
ActivationManagementThe clock used by activation lifecycle management, including activation collection, migratability checks, repartitioning, and rebalancing.GrainDirectoryThe clock used by the grain directory cache for entry expiration.GrainsThe clock exposed to grains viaIGrainRuntime.TimeProviderand used to drive grain timers.MembershipThe clock used by cluster membership loops, including the membership agent, membership table maintenance and cleanup, and silo health monitoring and probing.MessagingThe clock used by messaging infrastructure, such as request timeout tracking and gateway maintenance.SystemTimersThe clock used by silo background maintenance loops driven byIAsyncTimerFactory(grain directory maintenance and similar), excluding cluster membership, which usesTimeProviderNames.
