|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.astyanax.serializers.AbstractSerializer<java.lang.Integer>
com.netflix.astyanax.serializers.IntegerSerializer
public final class IntegerSerializer
Converts bytes to Integer (32 bit) and vice versa. It is important not to confuse IntegerSerializer with IntegerType in cassandra. IntegerSerializer serializes 32 bit integers while IntegerType comparator in cassandra is a BigInteger.
| Constructor Summary | |
|---|---|
IntegerSerializer()
|
|
| Method Summary | |
|---|---|
java.lang.Integer |
fromByteBuffer(java.nio.ByteBuffer byteBuffer)
Extract an object of type T from the bytes. |
java.lang.Integer |
fromBytes(byte[] bytes)
|
java.nio.ByteBuffer |
fromString(java.lang.String str)
Create a ByteBuffer by first parsing the type out of a string |
static IntegerSerializer |
get()
|
ComparatorType |
getComparatorType()
|
java.nio.ByteBuffer |
getNext(java.nio.ByteBuffer byteBuffer)
Return the byte buffer for the next value in sorted order for the matching comparator type. |
java.lang.String |
getString(java.nio.ByteBuffer byteBuffer)
|
java.nio.ByteBuffer |
toByteBuffer(java.lang.Integer obj)
Extract bytes from the obj of type T |
| Methods inherited from class com.netflix.astyanax.serializers.AbstractSerializer |
|---|
computeInitialHashSize, fromBytesList, fromBytesMap, fromBytesSet, toBytes, toBytesList, toBytesList, toBytesList, toBytesMap, toBytesSet |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IntegerSerializer()
| Method Detail |
|---|
public static IntegerSerializer get()
public java.nio.ByteBuffer toByteBuffer(java.lang.Integer obj)
Serializer
toByteBuffer in interface Serializer<java.lang.Integer>toByteBuffer in class AbstractSerializer<java.lang.Integer>public java.lang.Integer fromByteBuffer(java.nio.ByteBuffer byteBuffer)
Serializer
fromByteBuffer in interface Serializer<java.lang.Integer>fromByteBuffer in class AbstractSerializer<java.lang.Integer>public java.lang.Integer fromBytes(byte[] bytes)
fromBytes in interface Serializer<java.lang.Integer>fromBytes in class AbstractSerializer<java.lang.Integer>public java.nio.ByteBuffer fromString(java.lang.String str)
Serializer
fromString in interface Serializer<java.lang.Integer>fromString in class AbstractSerializer<java.lang.Integer>public java.lang.String getString(java.nio.ByteBuffer byteBuffer)
getString in interface Serializer<java.lang.Integer>getString in class AbstractSerializer<java.lang.Integer>public java.nio.ByteBuffer getNext(java.nio.ByteBuffer byteBuffer)
Serializer
getNext in interface Serializer<java.lang.Integer>getNext in class AbstractSerializer<java.lang.Integer>public ComparatorType getComparatorType()
getComparatorType in interface Serializer<java.lang.Integer>getComparatorType in class AbstractSerializer<java.lang.Integer>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||