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

com.github.houbb.consistent.hashing.api.IConsistentHashing Maven / Gradle / Ivy

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();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy