Class HeapTupleFileManager

  • All Implemented Interfaces:
    TupleFileManager

    public class HeapTupleFileManager
    extends java.lang.Object
    implements TupleFileManager
    This class provides high-level operations on heap tuple files.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static org.apache.logging.log4j.Logger logger
      A logging object for reporting anything interesting that happens.
      private StorageManager storageManager
      A reference to the storage manager.
    • Field Detail

      • logger

        private static org.apache.logging.log4j.Logger logger
        A logging object for reporting anything interesting that happens.
      • storageManager

        private StorageManager storageManager
        A reference to the storage manager.
    • Constructor Detail

      • HeapTupleFileManager

        public HeapTupleFileManager​(StorageManager storageManager)
    • Method Detail

      • getDBFileType

        public DBFileType getDBFileType()
        Description copied from interface: TupleFileManager
        Returns the DBFileType value used to indicate this storage format in data files.
        Specified by:
        getDBFileType in interface TupleFileManager
        Returns:
        the DBFileType value used to indicate this storage format in data files.
      • getShortName

        public java.lang.String getShortName()
        Description copied from interface: TupleFileManager
        Returns the "short name" used to refer to this storage-file type. This is the name used in e.g. CREATE TABLE commands to specify that a table-file should use a particular storage-file type.
        Specified by:
        getShortName in interface TupleFileManager
        Returns:
        the "short name" used to refer to this storage-file type.
      • createTupleFile

        public TupleFile createTupleFile​(DBFile dbFile,
                                         Schema schema)
        Description copied from interface: TupleFileManager
        Initialize the specified DBFile to be a new empty table with the specified schema.
        Specified by:
        createTupleFile in interface TupleFileManager
        Parameters:
        dbFile - the file to use for the new tuple-file
        schema - the schema of the table data to store in the file
        Returns:
        a TupleFile object that allows tuple operations to be performed against the DBFile.
      • openTupleFile

        public TupleFile openTupleFile​(DBFile dbFile)
        Description copied from interface: TupleFileManager
        Open the specified DBFile as a TupleFile of a specific type, containing tuples of data conforming to a specific schema.
        Specified by:
        openTupleFile in interface TupleFileManager
        Parameters:
        dbFile - the tuple-file to open
        Returns:
        a TupleFile object that allows tuple operations to be performed against the DBFile.
      • saveMetadata

        public void saveMetadata​(TupleFile tupleFile)
        Description copied from interface: TupleFileManager
        Writes the metadata (schema and stats information) for the tuple-file back into the tuple-file. The schema and statistics are represented as separate objects (Schema and TableStats objects, specifically), so of course they need to be serialized into a binary representation for storage when they change.
        Specified by:
        saveMetadata in interface TupleFileManager
        Parameters:
        tupleFile - the tuple-file whose metadata should be persisted