Class Record.Type<K,​V>

    • Method Detail

      • getMemory

        public int getMemory​(Record<K,​V> record)
        Description copied from interface: DataType
        Calculates the amount of used memory in bytes.
        Specified by:
        getMemory in interface DataType<K>
        Specified by:
        getMemory in class BasicDataType<Record<K,​V>>
        Parameters:
        record - the object
        Returns:
        the used memory
      • compare

        public int compare​(Record<K,​V> aObj,
                           Record<K,​V> bObj)
        Description copied from interface: DataType
        Compare two keys.
        Specified by:
        compare in interface java.util.Comparator<K>
        Specified by:
        compare in interface DataType<K>
        Overrides:
        compare in class BasicDataType<Record<K,​V>>
        Parameters:
        aObj - the first key
        bObj - the second key
        Returns:
        -1 if the first key is smaller, 1 if larger, and 0 if equal
      • read

        public Record<K,​V> read​(java.nio.ByteBuffer buff)
        Description copied from interface: DataType
        Read an object.
        Specified by:
        read in interface DataType<K>
        Specified by:
        read in class BasicDataType<Record<K,​V>>
        Parameters:
        buff - the source buffer
        Returns:
        the object
      • createStorage

        public Record<K,​V>[] createStorage​(int size)
        Description copied from interface: DataType
        Create storage object of array type to hold values
        Parameters:
        size - number of values to hold
        Returns:
        storage object