Table of Contents

Class LocatorOptions

Namespace
IceRpc.Locator
Assembly
IceRpc.Locator.dll

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. 0 means no cache. Defaults to 100.

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 1 second.

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.