Table of Contents

Class NamingSystemMappingData

Namespace
FishMMO.Server.Implementation.World.SceneServer
Assembly
FishMMO.Server.dll

Mapping data container for naming caches. Provides TTL-friendly O(1) touch caches for direct and reverse lookups.

public class NamingSystemMappingData : RuntimeDataContainer, IRuntimeDataContainer<INetworkManagerWrapper, ServerManager, NetworkConnection, IRuntimeDataContainer>, IServerComponent<INetworkManagerWrapper, ServerManager, NetworkConnection, IRuntimeDataContainer>, INamingSystemMappingData, IRuntimeDataContainer, IServerComponent
Inheritance
NamingSystemMappingData
Implements
Inherited Members

Properties

CharacterIdByNameCache

Reverse cache of character identifiers keyed by lowercase character name.

public LastSeenCacheTracker<string, long> CharacterIdByNameCache { get; }

Property Value

LastSeenCacheTracker<string, long>

CharacterMissingByNameCache

Negative reverse-lookup cache keyed by lowercase character name.

public LastSeenCacheTracker<string, byte> CharacterMissingByNameCache { get; }

Property Value

LastSeenCacheTracker<string, byte>

CharacterNameByIdCache

Cache of character names keyed by character identifier.

public LastSeenCacheTracker<long, string> CharacterNameByIdCache { get; }

Property Value

LastSeenCacheTracker<long, string>

CharacterNameByNameCache

Reverse cache of canonical character names keyed by lowercase character name.

public LastSeenCacheTracker<string, string> CharacterNameByNameCache { get; }

Property Value

LastSeenCacheTracker<string, string>

GuildNameByIdCache

Cache of guild names keyed by guild identifier.

public LastSeenCacheTracker<long, string> GuildNameByIdCache { get; }

Property Value

LastSeenCacheTracker<long, string>

Methods

Clear()

Clears all naming caches.

public override void Clear()

InitializeOnce()

Initializes all naming caches.

public override ServerComponentInitializationStatus InitializeOnce()

Returns

ServerComponentInitializationStatus

OnDeinitialize()

Deinitializes naming caches and releases references.

protected override void OnDeinitialize()

SweepAllCaches(double, TimeSpan, int, int)

Sweeps all five caches with identical TTL and scan parameters.

public void SweepAllCaches(double now, TimeSpan ttl, int maxScan, int maxRemove)

Parameters

now double

Current MonotonicClock reading. Every naming cache is timed on that clock, through the trackers' monotonic overloads: a TTL is a local duration.

ttl TimeSpan

Entry time-to-live.

maxScan int

Maximum entries scanned per cache.

maxRemove int

Maximum entries removed per cache.