Show / Hide Table of Contents

Interface IUniqueSequenceProvider

Represents an entity that provides unique identifiers via named sequences

Inherited Members
INamed.Name
Namespace: NFX.DataAccess
Assembly: NFX.dll
Syntax
public interface IUniqueSequenceProvider : INamed

Properties

SequenceScopeNames

Returns the list of all scope names in the instance

Declaration
IEnumerable<string> SequenceScopeNames { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.String>

Methods

GenerateOneSequenceID(String, String, Int32, Nullable<UInt64>, Boolean)

Generates one ID for the supplied sequence name. Note: do not confuse with block pre-allocation, which is an internal optimization. Even if 100 IDs are pre-allocated the method returns one unique ID

Declaration
ulong GenerateOneSequenceID(string scopeName, string sequenceName, int blockSize = 0, ulong ? vicinity, bool noLWM = false)
Parameters
Type Name Description
System.String scopeName

The name of scope where sequences are kept

System.String sequenceName

The name of sequence within the scope for which ID to be obtained

System.Int32 blockSize

If >0 specifies how many sequence values to pre-allocate, otherwise provider would use its default setting

System.Nullable<System.UInt64> vicinity

The location on ID counter scale, the issuing authority may disregard this parameter

System.Boolean noLWM

When true, does not start async fetch of the next ID block while the current block reaches low-water-mark. This may not be desired in some short-lived processes. The provider may disregard this flag

Returns
Type Description
System.UInt64

The new ULONG sequence value

GetSequenceInfos(String)

Returns sequnce information enumerable for all sequences in the named scope

Declaration
IEnumerable<ISequenceInfo> GetSequenceInfos(string scopeName)
Parameters
Type Name Description
System.String scopeName
Returns
Type Description
System.Collections.Generic.IEnumerable<ISequenceInfo>

TryGenerateManyConsecutiveSequenceIDs(String, String, Int32, Nullable<UInt64>, Boolean)

Tries to generate many consecutive IDs. If the reserved block gets exhausted, then the returned ID count may be less than requested.

Declaration
ConsecutiveUniqueSequenceIDs TryGenerateManyConsecutiveSequenceIDs(string scopeName, string sequenceName, int idCount, ulong ? vicinity, bool noLWM = false)
Parameters
Type Name Description
System.String scopeName

The name of scope where sequences are kept

System.String sequenceName

The name of sequence within the scope for which ID to be obtained

System.Int32 idCount

How many Consecutive IDs should the system try to reserve

System.Nullable<System.UInt64> vicinity

The location on ID counter scale, the issuing authority may disregard this parameter

System.Boolean noLWM

When true, does not start async fetch of the next ID block while the current block reaches low-water-mark. This may not be desired in some short-lived processes. The provider may disregard this flag

Returns
Type Description
ConsecutiveUniqueSequenceIDs

The first uniqueID along with the number of Consecutive IDs that the system could allocate which can be less than requested number of IDs

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