Class LocatorOptions
A property bag used to configure a LocatorLocationResolver.
public sealed record LocatorOptions : IEquatable<LocatorOptions>
- Inheritance
-
LocatorOptions
- Implements
- Inherited Members
Properties
Background
Gets or sets a value indicating whether or not the locator must enable background lookups.
public bool Background { get; set; }
Property Value
- bool
When true, if the lookup finds a stale cache entry, it returns the stale entry's server address(es) and executes a call "in the background" to refresh this entry. Defaults to false, meaning the lookup does not return stale values.
MaxCacheSize
Gets or sets the maximum size of the cache.
public int MaxCacheSize { get; set; }
Property Value
- int
The maximum size of the cache.
0means no cache. Defaults to100.
RefreshThreshold
Gets or sets the refresh threshold. When the age of a cache entry is less than or equal to this value, it's considered up to date and won't be updated even when the caller requests a refresh.
public TimeSpan RefreshThreshold { get; set; }
Property Value
- TimeSpan
The refresh threshold. Defaults to
1second.
ResolveTimeout
Gets or sets the timeout for locator resolution. When multiple callers concurrently request the same address, the locator interceptor sends a single request to the underlying locator; this timeout starts when that request is issued and applies to all callers.
public TimeSpan ResolveTimeout { get; set; }
Property Value
- TimeSpan
The locator resolve timeout. Defaults to
10seconds.
Ttl
Gets or sets the time-to-live. This is the time period after which a cache entry is considered stale.
public TimeSpan Ttl { get; set; }
Property Value
- TimeSpan
The time to live. Defaults to InfiniteTimeSpan, meaning the cache entries never become stale.