Package com.fasterxml.clustermate.api

Examples of com.fasterxml.clustermate.api.KeyHash


    @Override
    public NodesForKey getNodesFor(K key)
    {
        int fullHash = _keyConverter.routingHashFor(key);
        KeyHash hash = new KeyHash(fullHash, _keyspace.getLength());
        int currVersion = _version.get();
        int modulo = hash.getModuloHash();
        NodesForKey nodes = _routing.get(modulo);
        // fast (and common) case: pre-calculated, valid info exists:
        if (nodes != null && nodes.version() == currVersion) {
            return nodes;
        }
View Full Code Here


     * Factory method for constructing {@link KeyHash} instances that
     * are used in place of raw hash values (to reduce chance that "raw"
     * and modulo hash values are incorrectly used)
     */
    public KeyHash hash(int fullHash) {
        return new KeyHash(fullHash, _length);
    }
View Full Code Here

    @Override
    public NodesForKey getNodesFor(K key)
    {
        int fullHash = _keyConverter.routingHashFor(key);
        KeyHash hash = new KeyHash(fullHash, _keyspace.getLength());
        int currVersion = _version.get();
        int modulo = hash.getModuloHash();
        NodesForKey nodes = _routing.get(modulo);
        // fast (and common) case: pre-calculated, valid info exists:
        if (nodes != null && nodes.version() == currVersion) {
            return nodes;
        }
View Full Code Here

TOP

Related Classes of com.fasterxml.clustermate.api.KeyHash

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.