Namespace NFX.ApplicationModel.Pile
Classes
CacheExtensions
Provides read/write-through extensions
DefaultPile
Provides default implementation of IPile which stores objects in the local machine RAM
DefaultPileBase
Provides base for default implementation of IPile which stores objects on a local machine in memory or in the MMF
LocalCache
Provides default implementation of a cache that stores the mapping locally. The mapped-to objects may reside in local or distributed pile as configured
MMFPile
Provides default implementation of IPile which stores objects in Memory Mapped Files
PileAccessViolationException
Thrown by pile memory manager when a supplied PilePointer is not pointing to a valid buffer
PileCacheException
Thrown by pile cache
PileException
Thrown by pile memory manager
PileInstances
Provides a central multiton interface for mapping PileID -> pile instance. This class is thread-safe. This class is used by system code and should not be used by business developers
PileOutOfSpaceException
Thrown by pile memory manager when there is not anough room in the pile to perform the requested operation
TableOptions
Provides config options for cache tables
Structs
Dated2GDIDWithISOKey
Represents a date (not time)-sensitive value-type 2 GDIDs+3 char ISO code tuple, suitable for serving as a cache table key. The point of this structure is to avoid creation of references for Pile cache so keys alone do not stall the GC. The ISO code is case-insensitive
DatedGDIDWithISOKey
Represents a date (not time)-sensitive value-type GDID+3 char ISO code tuple, suitable for serving as a cache table key. The point of this structure is to avoid creation of references for Pile cache so keys alone do not stall the GC. The ISO code is case-insensitive
DefaultPileBase.SegmentCrawlStatus
Holds information obtained after a segment crawl
GDIDWithInt
Represents GDID with int
GDIDWithISOKey
Represents a value-type GDID+3 char ISO code tuple, suitable for serving as a cache table key. The point of this structure is to avoid creation of references for Pile cache so keys alone do not stall the GC. The ISO code is case-insensitive
GDIDWithStrHash
Represents a GDID with 8 byte string hash. The hash is case sensitive. The point of this structure is to avoid creation of references for Pile cache so keys alone do not stall the GC.
Piled<T>
Represents a PilePointer scoped by PileID. PileID uniquelly identifies the pile on the pointed-to machine. Piled is used for deferred load/deserialization from pile. This is a useful optimization technique for tree serialization, on deserialization Piled is returned, without having to deserialize the whole sub-graph of objects. Upon the first access to Pile.Value the Get from pile takes place transparently. When writing to pile, the Piled instance is written as a separate Pile entity with a distinct pointer
PileEntry
Represents an entry stored in a pile - a pointer+size vector. Used for pile enumeration
PilePointer
Represents a pointer to the pile object (object stored in a pile). The reference may be local or distributed in which case the NodeID is>=0. Distributed pointers are very useful for organizing piles of objects distributed among many servers, for example for "Big Memory" implementations or large neural networks where nodes may inter-connect between servers. The CLR reference to the IPile is not a part of this struct for performance and practicality reasons, as it is highly unlikely that there are going to be more than one instance of a pile in a process, however should more than 1 pile be allocated than this pointer would need to be wrapped in some other structure along with source IPile reference
TwoGDIDWithISOKey
Represents a value-type 2 GDIDs+3 char ISO code tuple, suitable for serving as a cache table key. The point of this structure is to avoid creation of references for Pile cache so keys alone do not stall the GC. The ISO code is case-insensitive
Interfaces
ICache
Represents a cache of expiring objects, which are identified by a key and stored in a pile. Pile allows to store hundreds of millions of objects without overloading the managed GC. The cache may be local or distributed
ICacheEntry<TKey>
Provides information about the item stored in cache
ICacheImplementation
ICacheTable
ICacheTable<TKey>
IPile
Represents a pile of objects - a custom memory heap that can store native CLR objects in a tightly-serialized form. Piles can be either local (allocate local RAM on the server), or distributed (allocate RAM on many servers). This class is designed primarily for applications that need to store/cache very many (100s of millions on local, billions on distributed) of objects in RAM (and/or possibly on disk) without causing the local CLR's GC scans of huge object graphs. Implementors of this interface are custom memory managers that favor the GC performance in apps with many objects at the cost of higher CPU usage. The implementor must be thread-safe for all operations unless stated otherwise on a member level. The memory represented by this class as a whole is not synchronizable, that is - it does not support functions like Interlocked-family, Lock, MemoryBarriers and the like that regular RAM supports. Should a need arise to interlock within the pile - a custom CLR-based lock must be used to syncronize access to pile as a whole, for example: a Get does not impose a lock on ALL concurrent writes throught the pile (a write does not block all gets either). The enumeration of the pile is thread-safe, however it does not guarantee the snapshot stability as parallel mutations may happen while enumeration takes place.
IPileImplementation
IPileStatus
Provides information about the pile - number of objects, allocated bytes, etc.
Enums
AllocationMode
Defines modes of allocation: space/time tradeoff
CollisionMode
Defines table collision modes: Speculative (prabability-based - ignores collisions) vs Durable (works slower but handles collisions)
LocalityKind
Indicates where pile implementation stores data: local vs distributed
ObjectPersistence
Denotes modes of object persistence
PileEntry.DataType
PutResult
Denotes statuses of cache table Put