Show / Hide Table of Contents

Class TableOptions

Provides config options for cache tables

Inheritance
System.Object
TableOptions
Implements
INamed
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.ApplicationModel.Pile
Assembly: NFX.dll
Syntax
[Serializable]
public sealed class TableOptions : INamed

Constructors

TableOptions(IConfigSectionNode, Boolean)

Declaration
public TableOptions(IConfigSectionNode node, bool nameRequired = true)
Parameters
Type Name Description
IConfigSectionNode node
System.Boolean nameRequired

TableOptions(String)

Declaration
public TableOptions(string name)
Parameters
Type Name Description
System.String name

Fields

DEFAULT_MAX_AGE_SEC_DEFAULT

Declaration
public const int DEFAULT_MAX_AGE_SEC_DEFAULT = 900
Field Value
Type Description
System.Int32

GROWTH_FACTOR_DEFAULT

Declaration
public const double GROWTH_FACTOR_DEFAULT = 2
Field Value
Type Description
System.Double

GROWTH_FACTOR_MAX

Declaration
public const double GROWTH_FACTOR_MAX = 4
Field Value
Type Description
System.Double

GROWTH_FACTOR_MIN

Declaration
public const double GROWTH_FACTOR_MIN = 1.2
Field Value
Type Description
System.Double

INITIAL_CAPACITY_DEFAULT

Declaration
public const long INITIAL_CAPACITY_DEFAULT = 4096L
Field Value
Type Description
System.Int64

INITIAL_CAPACITY_MIN

Declaration
public const long INITIAL_CAPACITY_MIN = 1024L
Field Value
Type Description
System.Int64

LOAD_FACTOR_HWM_DEFAULT

Declaration
public const double LOAD_FACTOR_HWM_DEFAULT = 0.7
Field Value
Type Description
System.Double

LOAD_FACTOR_HWM_MAX

Declaration
public const double LOAD_FACTOR_HWM_MAX = 0.95
Field Value
Type Description
System.Double

LOAD_FACTOR_HWM_MIN

Declaration
public const double LOAD_FACTOR_HWM_MIN = 0.45
Field Value
Type Description
System.Double

LOAD_FACTOR_LWM_DEFAULT

Declaration
public const double LOAD_FACTOR_LWM_DEFAULT = 0.5
Field Value
Type Description
System.Double

LOAD_FACTOR_LWM_MAX

Declaration
public const double LOAD_FACTOR_LWM_MAX = 0.7
Field Value
Type Description
System.Double

LOAD_FACTOR_LWM_MIN

Declaration
public const double LOAD_FACTOR_LWM_MIN = 0.1
Field Value
Type Description
System.Double

SHRINK_FACTOR_DEFAULT

Declaration
public const double SHRINK_FACTOR_DEFAULT = 0.75
Field Value
Type Description
System.Double

SHRINK_FACTOR_MAX

Declaration
public const double SHRINK_FACTOR_MAX = 0.9
Field Value
Type Description
System.Double

SHRINK_FACTOR_MIN

Declaration
public const double SHRINK_FACTOR_MIN = 0.5
Field Value
Type Description
System.Double

Properties

AsExternalParameter

Allows to get/set options as external parameters

Declaration
public object AsExternalParameter { get; set; }
Property Value
Type Description
System.Object

CollisionMode

Defines how table handles collisions. Note: this property can only be supplied to table ctor, the changes are ignored after the table has created

Declaration
[Config(Default = CollisionMode.Speculative)]
public CollisionMode CollisionMode { get; set; }
Property Value
Type Description
CollisionMode

DefaultMaxAgeSec

Specifies default max age length which is applied to cache items if Put() does not specify particular max age

Declaration
[Config]
public int DefaultMaxAgeSec { get; set; }
Property Value
Type Description
System.Int32

DetailedInstrumentation

True to include instrumentation details per table

Declaration
[Config]
public bool DetailedInstrumentation { get; set; }
Property Value
Type Description
System.Boolean

GrowthFactor

Defines the factor of growth - how much does a table grow when HWM is reached. The number has to be at least 1.2d

Declaration
[Config]
public double GrowthFactor { get; set; }
Property Value
Type Description
System.Double

InitialCapacity

How many elements an empty table should contain. The value is dependent on bucket count, so the actual table capacity is bucket-dependent

Declaration
[Config]
public long InitialCapacity { get; set; }
Property Value
Type Description
System.Int64

LoadFactorHWM

Defines the load factor above which the growth is triggered

Declaration
[Config]
public double LoadFactorHWM { get; set; }
Property Value
Type Description
System.Double

LoadFactorLWM

Defines the load factor below which the shrinking is triggered

Declaration
[Config]
public double LoadFactorLWM { get; set; }
Property Value
Type Description
System.Double

MaximumCapacity

How many elements a table may have at maximum, the property is checked at growth. Zero = no limit

Declaration
[Config]
public long MaximumCapacity { get; set; }
Property Value
Type Description
System.Int64

MinimumCapacity

How many elements a table may have at minimum, the property is checked at shrinking. Zero = no limit. The value is dependent on bucket count, so the actual table capacity is bucket-dependent

Declaration
[Config]
public long MinimumCapacity { get; set; }
Property Value
Type Description
System.Int64

Name

Declaration
public string Name { get; }
Property Value
Type Description
System.String

ShrinkFactor

Defines the factor of shrinking - how much does a table shrink when LWM is reached. The number has to be at most 0.7d

Declaration
[Config]
public double ShrinkFactor { get; set; }
Property Value
Type Description
System.Double

Methods

Clone()

Makes an identical copy of this instance

Declaration
public TableOptions Clone()
Returns
Type Description
TableOptions

Implements

INamed

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)
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