Class UsageMap


  • public class UsageMap
    extends Object
    Describes which database pages a particular table uses
    Author:
    Tim McCune
    • Field Detail

      • MAP_TYPE_INLINE

        public static final byte MAP_TYPE_INLINE
        Inline map type
        See Also:
        Constant Field Values
      • MAP_TYPE_REFERENCE

        public static final byte MAP_TYPE_REFERENCE
        Reference map type, for maps that are too large to fit inline
        See Also:
        Constant Field Values
    • Method Detail

      • read

        public static UsageMap read​(DatabaseImpl database,
                                    ByteBuffer buf)
                             throws IOException
        Parameters:
        database - database that contains this usage map
        buf - buffer which contains the usage map row info
        Returns:
        Either an InlineUsageMap or a ReferenceUsageMap, depending on which type of map is found
        Throws:
        IOException
      • getPageCount

        public int getPageCount()
      • containsPageNumber

        public boolean containsPageNumber​(int pageNumber)
        Determines if the given page number is contained in this map.
      • addPageNumber

        public void addPageNumber​(int pageNumber)
                           throws IOException
        Add a page number to this usage map
        Throws:
        IOException
      • removePageNumber

        public void removePageNumber​(int pageNumber)
                              throws IOException
        Remove a page number from this usage map
        Throws:
        IOException