Class IndexPageCache
- java.lang.Object
-
- com.healthmarketscience.jackcess.impl.IndexPageCache
-
public class IndexPageCache extends Object
Manager of the index pages for a IndexData.- Author:
- James Ahlborn
-
-
Constructor Summary
Constructors Constructor Description IndexPageCache(IndexData indexData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.healthmarketscience.jackcess.impl.IndexPageCache.CacheDataPagefindCacheDataPage(IndexData.Entry e)Finds the index page on which the given entry does or should reside.com.healthmarketscience.jackcess.impl.IndexPageCache.CacheDataPagegetCacheDataPage(Integer pageNumber)Returns a CacheDataPage for the given page number, may benullif the given page number is invalid.IndexDatagetIndexData()PageChannelgetPageChannel()voidsetRootPageNumber(int pageNumber)Sets the root page for this index, must be called before normal usage.StringtoString()voidwrite()Writes any outstanding changes for this index to the file.
-
-
-
Constructor Detail
-
IndexPageCache
public IndexPageCache(IndexData indexData)
-
-
Method Detail
-
getIndexData
public IndexData getIndexData()
-
getPageChannel
public PageChannel getPageChannel()
-
setRootPageNumber
public void setRootPageNumber(int pageNumber) throws IOExceptionSets the root page for this index, must be called before normal usage.- Parameters:
pageNumber- the root page number- Throws:
IOException
-
write
public void write() throws IOExceptionWrites any outstanding changes for this index to the file.- Throws:
IOException
-
getCacheDataPage
public com.healthmarketscience.jackcess.impl.IndexPageCache.CacheDataPage getCacheDataPage(Integer pageNumber) throws IOException
Returns a CacheDataPage for the given page number, may benullif the given page number is invalid. Loads the given page if necessary.- Throws:
IOException
-
findCacheDataPage
public com.healthmarketscience.jackcess.impl.IndexPageCache.CacheDataPage findCacheDataPage(IndexData.Entry e) throws IOException
Finds the index page on which the given entry does or should reside.- Parameters:
e- the entry to find- Throws:
IOException
-
-