C# Class Hydra.Core.Sharding.JumpSharding

Jump Consistent Hash implementation for shard picker
Inheritance: ISharding
Mostra file Open project: Amazebytes/Hydra Class Usage Examples

Public Methods

Method Description
GetShard ( String key, Int32 buckets ) : Int32

Get computed shard index

Private Methods

Method Description
JumpConsistentHash ( System.UInt64 key, Int32 buckets ) : Int32

Method Details

GetShard() public method

Get computed shard index
public GetShard ( String key, Int32 buckets ) : Int32
key String Sharded identifier
buckets System.Int32 Total number of shards
return System.Int32