C# Class Cedar.IdWorker

Exibir arquivo Open project: Vadi/Cedar Class Usage Examples

Public Methods

Method Description
DecomposeKey ( long key ) : long

GetUniqueId ( ) : long

IdWorker ( long shardId ) : System
IdWorker ( long shardId, Func timeMaker ) : System

SetBeginSequence ( long s ) : void

Protected Methods

Method Description
TillNextMillis ( long l ) : long

Private Methods

Method Description
CreateDecomposeMask ( ) : void

creates a masks for extracting 10 bit of shard.

Method Details

DecomposeKey() public method

public DecomposeKey ( long key ) : long
key long
return long

GetUniqueId() public method

public GetUniqueId ( ) : long
return long

IdWorker() public method

public IdWorker ( long shardId ) : System
shardId long
return System

IdWorker() public method

public IdWorker ( long shardId, Func timeMaker ) : System
shardId long
timeMaker Func
return System

SetBeginSequence() public method

public SetBeginSequence ( long s ) : void
s long
return void

TillNextMillis() protected method

protected TillNextMillis ( long l ) : long
l long
return long