// TODO: naive linear search of the token map
public Range<Token> getRange(ByteBuffer key)
    {
        // TODO: naive linear search of the token map
        Token<?> t = partitioner.getToken(key);
        for (Range<Token> range : rangeMap.keySet())
            if (range.contains(t))
                return range;
        throw new RuntimeException("Invalid token information returned by describe_ring: " + rangeMap);
    }
public Range<Token> getRange(ByteBuffer key)
{
// TODO: naive linear search of the token map
Token<?> t = partitioner.getToken(key);
for (Range<Token> range : rangeMap.keySet())
public Range<Token> getRange(ByteBuffer key)
{
// TODO: naive linear search of the token map
Token<?> t = partitioner.getToken(key);
for (Range<Token> range : rangeMap.keySet())
if (range.contains(t))
return range;
throw new RuntimeException("Invalid token information returned by describe_ring: " + rangeMap);
}
public Range<Token> getRange(ByteBuffer key)
{
// TODO: naive linear search of the token map
Token<?> t = partitioner.getToken(key);
for (Range<Token> range : rangeMap.keySet())
if (range.contains(t))
return range;
throw new RuntimeException("Invalid token information returned by describe_ring: " + rangeMap);
}