C# Class getAddress.Sequence.SequenceGenerator

Datei anzeigen Open project: geffzhang/Sequence

Public Properties

Property Type Description
MaxNumberOfAttempts int

Public Methods

Method Description
NextAsync ( SequenceKey sequenceKey ) : Task
SequenceGenerator ( IStateProvider stateProvider ) : System

Private Methods

Method Description
CycleOrFailIfGreaterThanMaximum ( ISequence sequence, long newValue ) : long
CycleOrFailIfLessThanMinimum ( ISequence sequence, long newValue ) : long
ExecAsync ( SequenceKey sequenceKey, int retryAttempt ) : Task
TryGetSequenceValue ( SequenceKey sequenceKey ) : Task

Method Details

NextAsync() public method

Sequence could not be found The maximum sequence value has been reached and cycle is false The minimum sequence value has been reached and cycle is false The maximum number of retries has been reached
public NextAsync ( SequenceKey sequenceKey ) : Task
sequenceKey SequenceKey
return Task

SequenceGenerator() public method

public SequenceGenerator ( IStateProvider stateProvider ) : System
stateProvider IStateProvider
return System

Property Details

MaxNumberOfAttempts public_oe property

public int MaxNumberOfAttempts
return int