Show / Hide Table of Contents

Interface 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

Inherited Members
IApplicationComponent.ComponentSID
IApplicationComponent.ComponentDirector
IApplicationComponent.ComponentCommonName
System.IDisposable.Dispose()
Namespace: NFX.ApplicationModel.Pile
Assembly: NFX.dll
Syntax
public interface ICache : IApplicationComponent, IDisposable

Properties

Count

Returns how many records are kept in cache

Declaration
long Count { get; }
Property Value
Type Description
System.Int64

Locality

Returns whether the cache key:value mappings are local or distributed

Declaration
LocalityKind Locality { get; }
Property Value
Type Description
LocalityKind

Persistence

Returns the model of key:value mapping persistence that this cache supports

Declaration
ObjectPersistence Persistence { get; }
Property Value
Type Description
ObjectPersistence

PileStatus

Returns the status of the pile where object are stored

Declaration
IPileStatus PileStatus { get; }
Property Value
Type Description
IPileStatus

Tables

Tables that this cache contains

Declaration
IRegistry<ICacheTable> Tables { get; }
Property Value
Type Description
IRegistry<ICacheTable>

Methods

GetOrCreateTable<TKey>(String, out Boolean, IEqualityComparer<TKey>)

Returns existing table by name, if it does not exist creates a new table. For existing table the types must be identical to the ones used at creation

Declaration
ICacheTable<TKey> GetOrCreateTable<TKey>(string tableName, out bool createdNew, IEqualityComparer<TKey> keyComparer = null)
Parameters
Type Name Description
System.String tableName
System.Boolean createdNew
System.Collections.Generic.IEqualityComparer<TKey> keyComparer
Returns
Type Description
ICacheTable<TKey>
Type Parameters
Name Description
TKey

GetOrCreateTable<TKey>(String, IEqualityComparer<TKey>)

Returns existing table by name, if it does not exist creates a new table. For existing table the types must be identical to the ones used at creation

Declaration
ICacheTable<TKey> GetOrCreateTable<TKey>(string tableName, IEqualityComparer<TKey> keyComparer = null)
Parameters
Type Name Description
System.String tableName
System.Collections.Generic.IEqualityComparer<TKey> keyComparer
Returns
Type Description
ICacheTable<TKey>
Type Parameters
Name Description
TKey

GetTable<TKey>(String)

Returns existing table by name, if it does not exist thorws. The TKey must correspond to existing table

Declaration
ICacheTable<TKey> GetTable<TKey>(string tableName)
Parameters
Type Name Description
System.String tableName
Returns
Type Description
ICacheTable<TKey>
Type Parameters
Name Description
TKey

PurgeAll()

Removes all data from all tables stored in the cache

Declaration
void PurgeAll()

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
CacheExtensions.FetchFrom<TKey, TResult>(ICache, TKey, String, ICacheParams, out Boolean)
CacheExtensions.FetchThrough<TKey, TResult>(ICache, TKey, String, ICacheParams, Func<TKey, TResult>, Func<TKey, TResult, TResult>)
CacheExtensions.DeleteThrough<TKey>(ICache, TKey, String, ICacheParams, Func<TKey, Boolean>)
CacheExtensions.SaveThrough<TKey, TData>(ICache, TKey, TData, String, ICacheParams, Func<TKey, TData, Int32>)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX