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

com.netflix.astyanax.serializers.ReversedSerializer Maven / Gradle / Ivy

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

import java.nio.ByteBuffer;

public class ReversedSerializer extends AbstractSerializer{

	@SuppressWarnings("rawtypes")
	private static final ReversedSerializer instance = new ReversedSerializer() ;
	
	@SuppressWarnings("unchecked")
	public static  ReversedSerializer get()
	{		
		return instance;		
	}
		
	@Override
	public ByteBuffer toByteBuffer(T obj) {
		if (obj == null)
			return null;
		
		return SerializerTypeInferer.getSerializer(obj).toByteBuffer(obj);		
	}

	@Override
	public T fromByteBuffer(ByteBuffer byteBuffer) {
        throw new RuntimeException(
                "ReversedSerializer.fromByteBuffer() Not Implemented.");
	}
	
    @Override
    public ComparatorType getComparatorType() {
        return ComparatorType.REVERSEDTYPE;
    }

    @Override
    public ByteBuffer getNext(ByteBuffer byteBuffer) {
        throw new RuntimeException(
                "ReversedSerializer.getNext() Not implemented.");
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy