Class HeapTupleSchema

    • Constructor Detail

      • HeapTupleSchema

        public HeapTupleSchema​(HeapTupleSchema.Builder builder)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • generateClass

        protected void generateClass()
                              throws java.lang.Exception
        Specified by:
        generateClass in class TupleSchema
        Throws:
        java.lang.Exception
      • createTuple

        public FastTuple createTuple()
                              throws java.lang.Exception
        Description copied from class: TupleSchema
        Allocates a new tuple, completely separate from any pooling.
        Specified by:
        createTuple in class TupleSchema
        Returns:
        - FastTuple
        Throws:
        java.lang.Exception - - Throws an exception if unable to allocate tuple
      • createTypedTuple

        public <T> T createTypedTuple​(java.lang.Class<T> clazz)
                               throws java.lang.Exception
        Description copied from class: TupleSchema
        Allocates a new typed tuple, completely separate from any pooling. Use care to call TupleSchema.Builder.implementInterface(Class) before using this method
        Specified by:
        createTypedTuple in class TupleSchema
        Type Parameters:
        T - - TupleSchema type parameter
        Parameters:
        clazz - - Class implemented by the Tuple
        Returns:
        - FastTuple case to type TupleSchema
        Throws:
        java.lang.Exception - - Throws an exception if unable to allocate tuple or cast to the specified type
      • createTupleArray

        public FastTuple[] createTupleArray​(int size)
                                     throws java.lang.Exception
        Description copied from class: TupleSchema
        Allocates an array of tuples. This method will try to ensure that tuples get allocated in adjacent memory, however with the heap based allocation this is not guaranteed.
        Specified by:
        createTupleArray in class TupleSchema
        Parameters:
        size - the number of tuples in the array.
        Returns:
        - Array of FastTuple
        Throws:
        java.lang.Exception - - Throws if unable to allocate tuple array
      • createTypedTupleArray

        public <T> T[] createTypedTupleArray​(java.lang.Class<T> clazz,
                                             int size)
                                      throws java.lang.Exception
        Description copied from class: TupleSchema
        * Allocates an array of tuples. This method will try to ensure that tuples get allocated in adjacent memory, however with the heap based allocation this is not guaranteed.
        Specified by:
        createTypedTupleArray in class TupleSchema
        Type Parameters:
        T - - TupleSchema type parameter
        Parameters:
        clazz - - Class implemented by the Tuple
        size - - the number of tuples in the array
        Returns:
        - Array of FastTuple cast to type TupleSchema
        Throws:
        java.lang.Exception - - Throws is unable to allocate tuple array or cast to the specified type
      • destroyTupleArray

        public void destroyTupleArray​(FastTuple[] ary)
        Description copied from class: TupleSchema
        Deallocates memory for an array of tuples. Assumes that they were allocated as an array.
        Specified by:
        destroyTupleArray in class TupleSchema
        Parameters:
        ary - - Array of FastTuple to deallocate
      • destroyTypedTupleArray

        public <T> void destroyTypedTupleArray​(T[] ary)
        Description copied from class: TupleSchema
        Deallocates memory for an array of typed tuples. Assumes that they were allocated as an array.
        Specified by:
        destroyTypedTupleArray in class TupleSchema
        Type Parameters:
        T - - TupleSchema underlying class implemented by tuples
        Parameters:
        ary - - Array of typed FastTuple to deallocate