public static class BenchmarkUtils.KeySerializer extends Object implements CacheSerializer<Long>
Constructor and Description |
---|
KeySerializer(int keyLen) |
Modifier and Type | Method and Description |
---|---|
Long |
deserialize(ByteBuffer buf)
Deserialize from the specified
DataInput instance. |
void |
serialize(Long val,
ByteBuffer buf)
Serialize the specified type into the specified
ByteBuffer instance. |
int |
serializedSize(Long value)
Calculate the number of bytes that will be produced by
CacheSerializer.serialize(Object, java.nio.ByteBuffer)
for given object t . |
public void serialize(Long val, ByteBuffer buf)
CacheSerializer
ByteBuffer
instance.serialize
in interface CacheSerializer<Long>
val
- type that needs to be serializedbuf
- ByteBuffer
into which serialization needs to happen.public Long deserialize(ByteBuffer buf)
CacheSerializer
DataInput
instance.deserialize
in interface CacheSerializer<Long>
buf
- ByteBuffer
from which deserialization needs to happen.public int serializedSize(Long value)
CacheSerializer
CacheSerializer.serialize(Object, java.nio.ByteBuffer)
for given object t
.serializedSize
in interface CacheSerializer<Long>
value
- object to calculate serialized size fort
Copyright © 2014–2016 Robert Stupp, Koeln, Germany, robert-stupp.de. All rights reserved.