public class LongSerializer extends Object implements OrderPreservingSerializer<Long>
Modifier and Type | Field and Description |
---|---|
static LongSerializer |
INSTANCE |
Constructor and Description |
---|
LongSerializer() |
Modifier and Type | Method and Description |
---|---|
Long |
convert(Object value)
Converts the given (not-null) value to the expected datatype V.
|
Long |
read(ScanBuffer buffer)
Reads an attribute from the given ReadBuffer.
|
Long |
readByteOrder(ScanBuffer buffer)
Reads an attribute from the given ReadBuffer assuming it was written in byte order.
|
void |
write(WriteBuffer out,
Long attribute)
Writes the attribute value to the given WriteBuffer.
|
void |
writeByteOrder(WriteBuffer out,
Long attribute)
Writes the attribute value to the given WriteBuffer such that the byte order of the result is equal to the
natural order of the attribute.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
verifyAttribute
public static final LongSerializer INSTANCE
public Long read(ScanBuffer buffer)
AttributeSerializer
read
in interface AttributeSerializer<Long>
buffer
- ReadBuffer to read attribute frompublic void write(WriteBuffer out, Long attribute)
AttributeSerializer
write
in interface AttributeSerializer<Long>
out
- WriteBuffer to write attribute toattribute
- Attribute to write to WriteBufferpublic Long readByteOrder(ScanBuffer buffer)
OrderPreservingSerializer
readByteOrder
in interface OrderPreservingSerializer<Long>
buffer
- ReadBuffer to read attribute frompublic void writeByteOrder(WriteBuffer out, Long attribute)
OrderPreservingSerializer
writeByteOrder
in interface OrderPreservingSerializer<Long>
out
- WriteBuffer to write attribute toattribute
- Attribute to write to WriteBufferpublic Long convert(Object value)
AttributeSerializer
IllegalArgumentException
if it cannot be converted.convert
in interface AttributeSerializer<Long>
value
- to convertCopyright © 2012–2015. All rights reserved.