C# Class Tup.Cobar4Net.Route.Util.PartitionUtil

数据分区工具
Mostra file Open project: tupunco/Tup.Cobar4Net Class Usage Examples

Public Methods

Method Description
Partition ( long hash ) : int
Partition ( string key, int start, int end ) : int
PartitionUtil ( int count, int length ) : System

Method Details

Partition() public method

public Partition ( long hash ) : int
hash long
return int

Partition() public method

public Partition ( string key, int start, int end ) : int
key string
start int
end int
return int

PartitionUtil() public method

                            
public PartitionUtil ( int count, int length ) : System
count int 表示定义的分区数
length int /// 表示对应每个分区的取值长度 /// 注意:其中count,length两个数组的长度必须是一致的。 /// 约束:1024 = sum((Count[i]*length[i])). count和length两个向量的点积恒等于1024 /// ///
return System