Package org.apache.druid.segment.data
Class ImmutableRTreeObjectStrategy
- java.lang.Object
-
- org.apache.druid.segment.data.ImmutableRTreeObjectStrategy
-
- All Implemented Interfaces:
Comparator<ImmutableRTree>
,ObjectStrategy<ImmutableRTree>
public class ImmutableRTreeObjectStrategy extends Object implements ObjectStrategy<ImmutableRTree>
-
-
Constructor Summary
Constructors Constructor Description ImmutableRTreeObjectStrategy(BitmapFactory bitmapFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(ImmutableRTree o1, ImmutableRTree o2)
ImmutableRTree
fromByteBuffer(ByteBuffer buffer, int numBytes)
Convert values from their underlying byte representation.Class<ImmutableRTree>
getClazz()
byte[]
toBytes(ImmutableRTree val)
void
writeTo(ImmutableRTree val, WriteOutBytes out)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from interface org.apache.druid.segment.data.ObjectStrategy
canCompare, fromByteBufferSafe, fromByteBufferWithSize
-
-
-
-
Constructor Detail
-
ImmutableRTreeObjectStrategy
public ImmutableRTreeObjectStrategy(BitmapFactory bitmapFactory)
-
-
Method Detail
-
getClazz
public Class<ImmutableRTree> getClazz()
- Specified by:
getClazz
in interfaceObjectStrategy<ImmutableRTree>
-
fromByteBuffer
public ImmutableRTree fromByteBuffer(ByteBuffer buffer, int numBytes)
Description copied from interface:ObjectStrategy
Convert values from their underlying byte representation. Implementations of this method may change the given buffer's mark, or limit, and position. Implementations of this method may not store the given buffer in a field of the "deserialized" object, need to useByteBuffer.slice()
,ByteBuffer.asReadOnlyBuffer()
orByteBuffer.duplicate()
in this case.- Specified by:
fromByteBuffer
in interfaceObjectStrategy<ImmutableRTree>
- Parameters:
buffer
- buffer to read value fromnumBytes
- number of bytes used to store the value, starting at buffer.position()- Returns:
- an object created from the given byte buffer representation
-
toBytes
public byte[] toBytes(ImmutableRTree val)
- Specified by:
toBytes
in interfaceObjectStrategy<ImmutableRTree>
-
writeTo
public void writeTo(ImmutableRTree val, WriteOutBytes out) throws IOException
- Specified by:
writeTo
in interfaceObjectStrategy<ImmutableRTree>
- Throws:
IOException
-
compare
public int compare(ImmutableRTree o1, ImmutableRTree o2)
- Specified by:
compare
in interfaceComparator<ImmutableRTree>
-
-