org.netbeans.mdr.persistence.btreeimpl.btreeindex
Interface BtreePageSource

All Superinterfaces:
MofidGenerator
All Known Implementing Classes:
BtreeCacheSource, BtreeFileSource, BtreeMDRSource

public interface BtreePageSource
extends MofidGenerator

Source of pages for a Btree.

Version:
1.0
Author:
Dana Bergen

Method Summary
 void dirtyPage(BtreePage page)
          Notify the BtreePageSource that the caller is going to modify this page.
 BtreePage getPage(byte[] pageId, Btree btree)
          Retrieve a page.
 EntryTypeInfo getPageIdInfo()
          Get an EntryTypeInfo for the datatype of this BtreePageSource's page IDs.
 int getPageIdLength()
          Returns the length of a page ID.
 int getPageSize()
          Returns the size of a page.
 BtreePage getRootPage(Btree btree)
          Retrieve the root page for this btree.
 BtreeStorage getStorage()
           
 boolean isNoPage(byte[] pageId)
          Test whether the passed-in pageId is equal to the null page ID.
 BigKeyPage newBigKeyPage(Btree btree)
          Creates a new oversize-key page and returns it.
 BtreePage newPage(Btree btree)
          Creates a new page and returns it.
 void setNoPage(byte[] pageId)
          Fills in the provided buffer with a value that represents a null page ID.
 void unpinPage(BigKeyPage page)
          Notify the BtreePageSource that the caller is done using this page.
 void unpinPage(BtreePage page)
          Notify the BtreePageSource that the caller is done using this page.
 
Methods inherited from interface org.netbeans.mdr.persistence.btreeimpl.btreeindex.MofidGenerator
getMofidPrefix, getNextMofid
 

Method Detail

getPageIdInfo

EntryTypeInfo getPageIdInfo()
Get an EntryTypeInfo for the datatype of this BtreePageSource's page IDs.


getPage

BtreePage getPage(byte[] pageId,
                  Btree btree)
                  throws StorageException
Retrieve a page.

Parameters:
pageId - byte array buffer containing pageId
btree - btree to which the page belongs
Returns:
the BtreePage
Throws:
StorageException

newPage

BtreePage newPage(Btree btree)
                  throws StorageException
Creates a new page and returns it.

Parameters:
btree - btree to which the page belongs
Returns:
the BtreePage
Throws:
StorageException

newBigKeyPage

BigKeyPage newBigKeyPage(Btree btree)
                         throws StorageException
Creates a new oversize-key page and returns it.

Parameters:
btree - btree to which the page belongs
Returns:
the BigKeyPage
Throws:
StorageException

getRootPage

BtreePage getRootPage(Btree btree)
                      throws StorageException
Retrieve the root page for this btree.

Parameters:
btree - Btree
Returns:
the root BtreePage
Throws:
StorageException

unpinPage

void unpinPage(BtreePage page)
Notify the BtreePageSource that the caller is done using this page.

Parameters:
page - BtreePage

unpinPage

void unpinPage(BigKeyPage page)
               throws StorageException
Notify the BtreePageSource that the caller is done using this page.

Parameters:
page - BigKeyPage
Throws:
StorageException

dirtyPage

void dirtyPage(BtreePage page)
               throws StorageException
Notify the BtreePageSource that the caller is going to modify this page.

Parameters:
page - BtreePage
Throws:
StorageException

setNoPage

void setNoPage(byte[] pageId)
Fills in the provided buffer with a value that represents a null page ID.

Parameters:
pageId - byte array to be filled in

isNoPage

boolean isNoPage(byte[] pageId)
Test whether the passed-in pageId is equal to the null page ID.

Returns:
true if the pageId is the null page ID, otherwise false

getPageIdLength

int getPageIdLength()
Returns the length of a page ID.

Returns:
length of a page ID from this BtreePageSource

getPageSize

int getPageSize()
Returns the size of a page.

Returns:
size of a page from this BtreePageSource

getStorage

BtreeStorage getStorage()


Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.