Class MetaType<D>

  • Type Parameters:
    D - type of opaque parameter passed as an operational context to Factory.create()
    All Implemented Interfaces:
    java.util.Comparator<DataType<?>>, DataType<DataType<?>>

    public final class MetaType<D>
    extends BasicDataType<DataType<?>>
    Class DBMetaType is a type for values in the type registry map.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map<java.lang.String,​java.lang.Object> cache  
      private D database  
      private java.lang.Thread.UncaughtExceptionHandler exceptionHandler  
    • Constructor Summary

      Constructors 
      Constructor Description
      MetaType​(D database, java.lang.Thread.UncaughtExceptionHandler exceptionHandler)  
    • Field Detail

      • database

        private final D database
      • exceptionHandler

        private final java.lang.Thread.UncaughtExceptionHandler exceptionHandler
      • cache

        private final java.util.Map<java.lang.String,​java.lang.Object> cache
    • Constructor Detail

      • MetaType

        public MetaType​(D database,
                        java.lang.Thread.UncaughtExceptionHandler exceptionHandler)
    • Method Detail

      • compare

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

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

        public DataType<?>[] 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