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

com.netflix.astyanax.partitioner.LongBOPPartitioner Maven / Gradle / Ivy

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

import java.nio.ByteBuffer;

/**
 * This partitioner is used mostly for tests 
 * @author elandau
 *
 */
public class LongBOPPartitioner extends BigInteger127Partitioner {

    private static final LongBOPPartitioner instance = new LongBOPPartitioner();
    public static Partitioner get() {
        return instance;
    }

    protected LongBOPPartitioner() {
        
    }
    
    @Override
    public String getTokenForKey(ByteBuffer key) {
        return Long.toString(key.duplicate().asLongBuffer().get());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy