Xindice API
version 1.1

org.apache.xindice.core.filer
Class Paged.FileHeader

java.lang.Object
  |
  +--org.apache.xindice.core.filer.Paged.FileHeader
Direct Known Subclasses:
BTree.BTreeFileHeader
Enclosing class:
Paged

protected abstract class Paged.FileHeader
extends Object

Paged file's header


Constructor Summary
Paged.FileHeader()
           
 
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 a key can be.
 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 used pages in the file
 int getWorkSize()
           
 void incRecordCount()
          Increment the number of records being managed by the file
 long incTotalCount()
           
 boolean isDirty()
           
 void read()
           
protected  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/initial storage.
 void setPageHeaderSize(byte pageHeaderSize)
          Set the size of a page header.
 void setPageSize(int pageSize)
          The size of a page.
 void setTotalCount(long totalCount)
          The number of used pages in the file.
 void write()
           
protected  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()
Method Detail

read

public final void read()
                throws IOException

read

protected void read(RandomAccessFile raf)
             throws IOException

write

public final void write()
                 throws IOException

write

protected void write(RandomAccessFile raf)
              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. This method should be called only while initializing Paged, not during normal processing.

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. This method should be called only while initializing Paged, not during normal processing.

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/initial storage. This method should be called only while initializing Paged, not during normal processing.

getPageCount

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

setTotalCount

public final void setTotalCount(long totalCount)
The number of used pages in the file. This method should be called only while initializing Paged, not during normal processing.

incTotalCount

public final long incTotalCount()

getTotalCount

public final long getTotalCount()
The number of used 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.

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 a key can be.

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()

Xindice API
version 1.1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.