Class KeyDataType

  • All Implemented Interfaces:
    java.util.Comparator<java.lang.Object>, org.h2.mvstore.type.DataType<java.lang.Object>

    public class KeyDataType
    extends java.lang.Object
    implements org.h2.mvstore.type.DataType<java.lang.Object>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int binarySearch​(java.lang.Object key, java.lang.Object storage, int size, int initialGuess)  
      int compare​(java.lang.Object a, java.lang.Object b)  
      java.lang.Object[] createStorage​(int size)  
      int getMemory​(java.lang.Object obj)  
      boolean isMemoryEstimationAllowed()  
      java.lang.Object read​(java.nio.ByteBuffer buff)  
      void read​(java.nio.ByteBuffer buff, java.lang.Object storage, int len)  
      void write​(org.h2.mvstore.WriteBuffer buff, java.lang.Object obj)  
      void write​(org.h2.mvstore.WriteBuffer buff, java.lang.Object storage, int len)  
      • 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
    • Constructor Detail

      • KeyDataType

        public KeyDataType​(CacheType type)
    • Method Detail

      • compare

        public int compare​(java.lang.Object a,
                           java.lang.Object b)
        Specified by:
        compare in interface java.util.Comparator<java.lang.Object>
        Specified by:
        compare in interface org.h2.mvstore.type.DataType<java.lang.Object>
      • getMemory

        public int getMemory​(java.lang.Object obj)
        Specified by:
        getMemory in interface org.h2.mvstore.type.DataType<java.lang.Object>
      • write

        public void write​(org.h2.mvstore.WriteBuffer buff,
                          java.lang.Object obj)
        Specified by:
        write in interface org.h2.mvstore.type.DataType<java.lang.Object>
      • read

        public java.lang.Object read​(java.nio.ByteBuffer buff)
        Specified by:
        read in interface org.h2.mvstore.type.DataType<java.lang.Object>
      • write

        public void write​(org.h2.mvstore.WriteBuffer buff,
                          java.lang.Object storage,
                          int len)
        Specified by:
        write in interface org.h2.mvstore.type.DataType<java.lang.Object>
      • read

        public void read​(java.nio.ByteBuffer buff,
                         java.lang.Object storage,
                         int len)
        Specified by:
        read in interface org.h2.mvstore.type.DataType<java.lang.Object>
      • binarySearch

        public int binarySearch​(java.lang.Object key,
                                java.lang.Object storage,
                                int size,
                                int initialGuess)
        Specified by:
        binarySearch in interface org.h2.mvstore.type.DataType<java.lang.Object>
      • isMemoryEstimationAllowed

        public boolean isMemoryEstimationAllowed()
        Specified by:
        isMemoryEstimationAllowed in interface org.h2.mvstore.type.DataType<java.lang.Object>
      • createStorage

        public java.lang.Object[] createStorage​(int size)
        Specified by:
        createStorage in interface org.h2.mvstore.type.DataType<java.lang.Object>