C# Class Candor.Data.SequenceIdGenerator

Generates sequences for tables in which the database does not have a built in sequence capability.
Show file Open project: michael-lang/candor-common

Private Properties

Property Type Description
GetSequenceIdStore SequenceIdStore
RenewCachedIds void

Public Methods

Method Description
NextId ( String tableName ) : String

Takes the first reserved Id for this node from the sequence. If necassary, it will reserve a new block of Ids.

SequenceIdGenerator ( ISequenceIdOptimisticSyncStore store ) : System

Creates a new generator that loads all sequence schemas from the supplied store.

SequenceIdGenerator ( ISequenceIdOptimisticSyncStore store, SequenceIdStore sequence ) : System

Creates a new generator with only a single sequence schema.

Private Methods

Method Description
GetSequenceIdStore ( String tableName ) : SequenceIdStore
RenewCachedIds ( SequenceIdStore sequence ) : void

Method Details

NextId() public method

Takes the first reserved Id for this node from the sequence. If necassary, it will reserve a new block of Ids.
public NextId ( String tableName ) : String
tableName String
return String

SequenceIdGenerator() public method

Creates a new generator that loads all sequence schemas from the supplied store.
public SequenceIdGenerator ( ISequenceIdOptimisticSyncStore store ) : System
store ISequenceIdOptimisticSyncStore
return System

SequenceIdGenerator() public method

Creates a new generator with only a single sequence schema.
public SequenceIdGenerator ( ISequenceIdOptimisticSyncStore store, SequenceIdStore sequence ) : System
store ISequenceIdOptimisticSyncStore
sequence SequenceIdStore
return System