C# Class Imgix_Dotnet.Sharding.HashShardingStrategy

A hashing shard strategy. The same path will always be sent to the same shard.
Inheritance: IShardingStrategy
ファイルを表示 Open project: estei/Imgix-Dotnet Class Usage Examples

Public Methods

Method Description
GetShardId ( string path, int shardCount ) : int

Get the shard id based on the passed in path. This is done through hashing the path.

Method Details

GetShardId() public method

Get the shard id based on the passed in path. This is done through hashing the path.
public GetShardId ( string path, int shardCount ) : int
path string The path
shardCount int How many shards are we working with
return int