API Reference
HostReachabilityCache
Fast, thread-safe reachability checks with short negative caching to avoid repeated slow failures on obviously unreachable hosts.
Inheritance
- Object
- HostReachabilityCache
Methods
GetRemainingTtl(System.String host) #Returns remaining negative-cache TTL for the host, or null when not cached.
Parameters
- host System.String
IsUnreachable(System.String host) #Returns true when the host is currently in the negative cache window.
Parameters
- host System.String
MarkUnreachable(System.String host, System.Nullable{System.TimeSpan} ttl) #Marks the host as unreachable for the configured TTL.
Parameters
- host System.String
- ttl System.Nullable{System.TimeSpan}
ProbeRpcAsync(System.String host) #Performs a very quick TCP probe to RPC endpoint mapper (135/tcp) and updates the cache. Returns true when connect succeeds, false otherwise.
Parameters
- host System.String
ProbeRpcOnceFast(System.String host) #Single-flight probe: ensures at most one RPC probe runs per host at a time. Other callers wait briefly for the first probe to complete and then decide based on cache. Useful for hot loops starting many checks concurrently (e.g., registry reads on one host).
Parameters
- host System.String
ShouldAttempt(System.String host) #Returns true if the host should be attempted now (not currently in a negative cache window). Resolves and normalizes host names to stable keys.
Parameters
- host System.String