All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.javaclub.cdl.client.matrix.rule.RouterStrategy Maven / Gradle / Ivy

The newest version!
package com.github.javaclub.cdl.client.matrix.rule;

import java.util.List;
import java.util.Map;


public interface RouterStrategy {

	/**
	 * @return 逻辑表切分字段名称
	 */
	public Map getShardingColumn();

	/**
	 * @param table 逻辑表
	 * @param shardColumnValue 切分字段值
	 * @return 相应节点上面的实际分表
	 */
	public Map getActualTable(String table, Object shardColumnValue);

	/**
	 * @param table 逻辑表
	 * @return 物理表映射关系
	 */
	public Map> getAllActualTable(String table);

	/**
	 * 注册hash函数计算逻辑实现
	 */
	public void setHashFunction(HashFunction hashFunction);
	
	public String getDefaultGroup();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy