Project JXTA

net.jxta.impl.xindice.core.filer
Class Paged.FileHeader

java.lang.Object
  extended bynet.jxta.impl.xindice.core.filer.Paged.FileHeader
Direct Known Subclasses:
BTree.BTreeFileHeader
Enclosing class:
Paged

public abstract class Paged.FileHeader
extends Object

FileHeader


Constructor Summary
Paged.FileHeader()
           
Paged.FileHeader(boolean read)
           
Paged.FileHeader(long pageCount)
           
Paged.FileHeader(long pageCount, int pageSize)
           
 
Method Summary
 void decRecordCount()
          Decrement the number of records being managed by the file
 long getFirstFreePage()
          The first free page in unused secondary space
 short getHeaderSize()
          The size of the FileHeader.
 long getLastFreePage()
          The last free page in unused secondary space
 short getMaxKeySize()
          Get the maximum number of bytes.
 long getPageCount()
          The number of pages in primary storage
 byte getPageHeaderSize()
          Get the size of a page header.
 int getPageSize()
          The size of a page.
 long getRecordCount()
          The number of records being managed by the file (not pages)
 long getTotalCount()
          The number of total pages in the file
 int getWorkSize()
           
 void incRecordCount()
          Increment the number of records being managed by the file
 boolean isDirty()
           
 void read()
           
 void read(RandomAccessFile raf)
           
 void setDirty()
           
 void setFirstFreePage(long firstFreePage)
          The first free page in unused secondary space
 void setHeaderSize(short headerSize)
          The size of the FileHeader.
 void setLastFreePage(long lastFreePage)
          The last free page in unused secondary space
 void setMaxKeySize(short maxKeySize)
          Set the maximum number of bytes a key can be.
 void setPageCount(long pageCount)
          The number of pages in primary storage
 void setPageHeaderSize(byte pageHeaderSize)
          Set the size of a page header.
 void setPageSize(int pageSize)
          The size of a page.
 void setRecordCount(long recordCount)
          The number of records being managed by the file (not pages)
 void setTotalCount(long totalCount)
          The number of total pages in the file
 void write()
           
 void write(RandomAccessFile raf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Paged.FileHeader

public Paged.FileHeader()

Paged.FileHeader

public Paged.FileHeader(long pageCount)

Paged.FileHeader

public Paged.FileHeader(long pageCount,
                        int pageSize)

Paged.FileHeader

public Paged.FileHeader(boolean read)
                 throws IOException
Method Detail

read

public final void read()
                throws IOException
Throws:
IOException

read

public void read(RandomAccessFile raf)
          throws IOException
Throws:
IOException

write

public final void write()
                 throws IOException
Throws:
IOException

write

public void write(RandomAccessFile raf)
           throws IOException
Throws:
IOException

setDirty

public final void setDirty()

isDirty

public final boolean isDirty()

setHeaderSize

public final void setHeaderSize(short headerSize)
The size of the FileHeader. Usually 1 OS Page


getHeaderSize

public final short getHeaderSize()
The size of the FileHeader. Usually 1 OS Page


setPageSize

public final void setPageSize(int pageSize)
The size of a page. Usually a multiple of a FS block


getPageSize

public final int getPageSize()
The size of a page. Usually a multiple of a FS block


setPageCount

public final void setPageCount(long pageCount)
The number of pages in primary storage


getPageCount

public final long getPageCount()
The number of pages in primary storage


setTotalCount

public final void setTotalCount(long totalCount)
The number of total pages in the file


getTotalCount

public final long getTotalCount()
The number of total pages in the file


setFirstFreePage

public final void setFirstFreePage(long firstFreePage)
The first free page in unused secondary space


getFirstFreePage

public final long getFirstFreePage()
The first free page in unused secondary space


setLastFreePage

public final void setLastFreePage(long lastFreePage)
The last free page in unused secondary space


getLastFreePage

public final long getLastFreePage()
The last free page in unused secondary space


setPageHeaderSize

public final void setPageHeaderSize(byte pageHeaderSize)
Set the size of a page header. Normally, 64 is sufficient.


getPageHeaderSize

public final byte getPageHeaderSize()
Get the size of a page header. Normally, 64 is sufficient


setMaxKeySize

public final void setMaxKeySize(short maxKeySize)
Set the maximum number of bytes a key can be. Normally, 256 is good


getMaxKeySize

public final short getMaxKeySize()
Get the maximum number of bytes. Normally, 256 is good.


setRecordCount

public final void setRecordCount(long recordCount)
The number of records being managed by the file (not pages)


incRecordCount

public final void incRecordCount()
Increment the number of records being managed by the file


decRecordCount

public final void decRecordCount()
Decrement the number of records being managed by the file


getRecordCount

public final long getRecordCount()
The number of records being managed by the file (not pages)


getWorkSize

public final int getWorkSize()

JXTA J2SE