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

数据分区工具单独版本,请使用singleton的模式调用。
Mostrar archivo Open project: tupunco/Tup.Cobar4Net Class Usage Examples

Public Methods

Method Description
Main ( string args ) : void
Partition ( long h ) : int
Partition ( string key ) : int
PartitionForSingle ( int count, int length ) : System

Private Methods

Method Description
Hash ( string s ) : long

Method Details

Main() public static method

public static Main ( string args ) : void
args string
return void

Partition() public method

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

Partition() public method

public Partition ( string key ) : int
key string
return int

PartitionForSingle() public method

public PartitionForSingle ( int count, int length ) : System
count int 表示定义的分区数
length int /// 表示对应每个分区的取值长度 ///

/// 注意:其中count,length两个数组的长度必须是一致的。 ///

///
return System