public class CompressedObjectStrategy<T extends Buffer> extends Object implements ObjectStrategy<ResourceHolder<T>>
| Modifier and Type | Class and Description |
|---|---|
static interface |
CompressedObjectStrategy.BufferConverter<T> |
| Modifier | Constructor and Description |
|---|---|
protected |
CompressedObjectStrategy(ByteOrder order,
CompressedObjectStrategy.BufferConverter<T> converter) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(ResourceHolder<T> o1,
ResourceHolder<T> o2) |
ResourceHolder<T> |
fromByteBuffer(ByteBuffer buffer,
int numBytes)
Convert values from their underlying byte representation.
|
Class<? extends ResourceHolder<T>> |
getClazz() |
byte[] |
toBytes(ResourceHolder<T> holder) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalsprotected CompressedObjectStrategy(ByteOrder order, CompressedObjectStrategy.BufferConverter<T> converter)
public Class<? extends ResourceHolder<T>> getClazz()
getClazz in interface ObjectStrategy<ResourceHolder<T extends Buffer>>public ResourceHolder<T> fromByteBuffer(ByteBuffer buffer, int numBytes)
ObjectStrategyfromByteBuffer in interface ObjectStrategy<ResourceHolder<T extends Buffer>>buffer - buffer to read value fromnumBytes - number of bytes used to store the value, starting at buffer.position()public byte[] toBytes(ResourceHolder<T> holder)
toBytes in interface ObjectStrategy<ResourceHolder<T extends Buffer>>public int compare(ResourceHolder<T> o1, ResourceHolder<T> o2)
compare in interface Comparator<ResourceHolder<T extends Buffer>>Copyright © 2015. All rights reserved.