Package io.permazen.kv.mvstore
Class ByteArrayDataType
java.lang.Object
io.permazen.kv.mvstore.ByteArrayDataType
- All Implemented Interfaces:
Comparator<byte[]>
,org.h2.mvstore.type.DataType<byte[]>
MVStore
DataType
implementation encoding byte[]
arrays sorted lexicographically.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
binarySearch
(byte[] key, Object storage, int size, int initialGuess) int
compare
(byte[] a, byte[] b) byte[][]
createStorage
(int size) int
getMemory
(byte[] value) boolean
byte[]
read
(ByteBuffer buf) void
read
(ByteBuffer buf, Object storage, int len) void
write
(org.h2.mvstore.WriteBuffer buf, byte[] value) void
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
-
Field Details
-
INSTANCE
-
-
Method Details
-
binarySearch
- Specified by:
binarySearch
in interfaceorg.h2.mvstore.type.DataType<byte[]>
-
compare
public int compare(byte[] a, byte[] b) - Specified by:
compare
in interfaceComparator<byte[]>
- Specified by:
compare
in interfaceorg.h2.mvstore.type.DataType<byte[]>
-
createStorage
public byte[][] createStorage(int size) - Specified by:
createStorage
in interfaceorg.h2.mvstore.type.DataType<byte[]>
-
getMemory
public int getMemory(byte[] value) - Specified by:
getMemory
in interfaceorg.h2.mvstore.type.DataType<byte[]>
-
isMemoryEstimationAllowed
public boolean isMemoryEstimationAllowed()- Specified by:
isMemoryEstimationAllowed
in interfaceorg.h2.mvstore.type.DataType<byte[]>
-
write
public void write(org.h2.mvstore.WriteBuffer buf, byte[] value) - Specified by:
write
in interfaceorg.h2.mvstore.type.DataType<byte[]>
-
write
- Specified by:
write
in interfaceorg.h2.mvstore.type.DataType<byte[]>
-
read
- Specified by:
read
in interfaceorg.h2.mvstore.type.DataType<byte[]>
-
read
- Specified by:
read
in interfaceorg.h2.mvstore.type.DataType<byte[]>
-