com.healthmarketscience.jackcess.impl
Class UsageMap

java.lang.Object
  extended by com.healthmarketscience.jackcess.impl.UsageMap

public class UsageMap
extends Object

Describes which database pages a particular table uses

Author:
Tim McCune

Nested Class Summary
 class UsageMap.PageCursor
          Utility class to traverse over the pages in the UsageMap.
 
Field Summary
static byte MAP_TYPE_INLINE
          Inline map type
static byte MAP_TYPE_REFERENCE
          Reference map type, for maps that are too large to fit inline
 
Method Summary
 void addPageNumber(int pageNumber)
          Add a page number to this usage map
 boolean containsPageNumber(int pageNumber)
          Determines if the given page number is contained in this map.
 UsageMap.PageCursor cursor()
           
 DatabaseImpl getDatabase()
           
 JetFormat getFormat()
           
 PageChannel getPageChannel()
           
 int getPageCount()
           
static UsageMap read(DatabaseImpl database, ByteBuffer buf)
           
 void removePageNumber(int pageNumber)
          Remove a page number from this usage map
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

getDatabase

public DatabaseImpl getDatabase()

getFormat

public JetFormat getFormat()

getPageChannel

public PageChannel getPageChannel()

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

cursor

public UsageMap.PageCursor cursor()

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2005–2017 Health Market Science. All rights reserved.