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

com.netflix.astyanax.connectionpool.impl.TokenHostConnectionPoolPartition Maven / Gradle / Ivy

There is a newer version: 3.10.2
Show newest version
package com.netflix.astyanax.connectionpool.impl;

import java.math.BigInteger;
import com.netflix.astyanax.connectionpool.LatencyScoreStrategy;

/**
 * Collection of pools that own a token range of the ring
 * 
 * @author elandau
 *
 * @param 
 */
public class TokenHostConnectionPoolPartition extends HostConnectionPoolPartition {

    private final BigInteger  token;

    public TokenHostConnectionPoolPartition(BigInteger id, LatencyScoreStrategy strategy) {
        super(strategy);
        this.token = id;
    }
    /**
     * Token or shard identifying this partition.
     * 
     * @return
     */
    public BigInteger id() {
        return token;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy