com.github.houbb.consistent.hashing.api.IConsistentHashing Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of consistent-hashing Show documentation
Show all versions of consistent-hashing Show documentation
The consistent-hashing tool for java.
The newest version!
package com.github.houbb.consistent.hashing.api;
import java.util.Map;
/**
* @author binbin.hou
* @since 0.0.1
*/
public interface IConsistentHashing {
/**
* 获取对应的节点
* @param key key
* @return 节点
* @since 0.0.1
*/
T get(final String key);
/**
* 添加节点
* @param node 节点
* @return this
* @since 0.0.1
*/
IConsistentHashing add(final T node);
/**
* 移除节点
* @param node 节点
* @return this
* @since 0.0.1
*/
IConsistentHashing remove(final T node);
/**
* 获取节点信息
* @return 节点
* @since 0.0.1
*/
Map nodeMap();
}