dbXML API

## org.dbxml.core.filer
Class Paged

    java.lang.Object
      |
      +--org.dbxml.core.filer.Paged

Direct Known Subclasses:
  BTree, HashFiler

public abstract class Paged
extends java.lang.Object

Paged is a paged file foundation that is used by both the BTree class and the HashFiler. It provides flexible paged I/O and page caching functionality.

Inner Class Summary
`class` `Paged.FileHeader` FileHeader
`class` `Paged.Page` Page
`class` `Paged.PageHeader` PageHeader

Constructor Summary
`Paged()`
`Paged(java.io.File file)`

Method Summary
`boolean` `close()`
`boolean` `create()`
`abstract Paged.FileHeader` `createFileHeader()` createFileHeader must be implemented by a Paged implementation in order to create an appropriate subclass instance of a FileHeader.
`abstract Paged.FileHeader` `createFileHeader(boolean read)` createFileHeader must be implemented by a Paged implementation in order to create an appropriate subclass instance of a FileHeader.
`abstract Paged.FileHeader` `createFileHeader(long pageCount)` createFileHeader must be implemented by a Paged implementation in order to create an appropriate subclass instance of a FileHeader.
`abstract Paged.FileHeader` `createFileHeader(long pageCount, int pageSize)` createFileHeader must be implemented by a Paged implementation in order to create an appropriate subclass instance of a FileHeader.
`abstract Paged.PageHeader` `createPageHeader()` createPageHeader must be implemented by a Paged implementation in order to create an appropriate subclass instance of a PageHeader.
`static int[]` `deleteArrayInt(int[] vals, int idx)`
`static long[]` `deleteArrayLong(long[] vals, int idx)`
`static short[]` `deleteArrayShort(short[] vals, int idx)`
`static Value[]` `deleteArrayValue(Value[] vals, int idx)`
`boolean` `drop()`
`boolean` `exists()`
`Paged.FileHeader` `getFileHeader()` getFileHeader returns the FileHeader
`static int[]` `insertArrayInt(int[] vals, int val, int idx)`
`static long[]` `insertArrayLong(long[] vals, long val, int idx)`
`static short[]` `insertArrayShort(short[] vals, short val, int idx)`
`static Value[]` `insertArrayValue(Value[] vals, Value val, int idx)`
`boolean` `isOpened()`
`boolean` `open()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Paged

    public Paged()

### Paged

    public Paged(java.io.File file)

Method Detail

### getFileHeader

    public Paged.FileHeader getFileHeader()

  getFileHeader returns the FileHeader
  Returns:
    The FileHeader

### exists

    public boolean exists()

### create

    public boolean create()
                   throws DBException

### open

    public boolean open()
                 throws DBException

### close

    public boolean close()
                  throws DBException

### isOpened

    public boolean isOpened()

### drop

    public boolean drop()
                 throws DBException

### createFileHeader

    public abstract Paged.FileHeader createFileHeader()

  createFileHeader must be implemented by a Paged implementation in order to create an appropriate subclass instance of a FileHeader.
  Returns:
    a new FileHeader

### createFileHeader

    public abstract Paged.FileHeader createFileHeader(boolean read)
                                               throws java.io.IOException

  createFileHeader must be implemented by a Paged implementation in order to create an appropriate subclass instance of a FileHeader.
  Parameters:
    `read` - If true, reads the FileHeader from disk
  Returns:
    a new FileHeader
  Throws:
    `java.io.IOException` - if an exception occurs

### createFileHeader

    public abstract Paged.FileHeader createFileHeader(long pageCount)

  createFileHeader must be implemented by a Paged implementation in order to create an appropriate subclass instance of a FileHeader.
  Parameters:
    `pageCount` - The number of pages to allocate for primary storage
  Returns:
    a new FileHeader

### createFileHeader

    public abstract Paged.FileHeader createFileHeader(long pageCount,
                                                      int pageSize)

  createFileHeader must be implemented by a Paged implementation in order to create an appropriate subclass instance of a FileHeader.
  Parameters:
    `pageCount` - The number of pages to allocate for primary storage
    `pageSize` - The size of a Page (should be a multiple of a FS block)
  Returns:
    a new FileHeader

### createPageHeader

    public abstract Paged.PageHeader createPageHeader()

  createPageHeader must be implemented by a Paged implementation in order to create an appropriate subclass instance of a PageHeader.
  Returns:
    a new PageHeader

### insertArrayValue

    public static Value[] insertArrayValue(Value[] vals,
                                           Value val,
                                           int idx)

### deleteArrayValue

    public static Value[] deleteArrayValue(Value[] vals,
                                           int idx)

### insertArrayLong

    public static long[] insertArrayLong(long[] vals,
                                         long val,
                                         int idx)

### deleteArrayLong

    public static long[] deleteArrayLong(long[] vals,
                                         int idx)

### insertArrayInt

    public static int[] insertArrayInt(int[] vals,
                                       int val,
                                       int idx)

### deleteArrayInt

    public static int[] deleteArrayInt(int[] vals,
                                       int idx)

### insertArrayShort

    public static short[] insertArrayShort(short[] vals,
                                           short val,
                                           int idx)

### deleteArrayShort

    public static short[] deleteArrayShort(short[] vals,
                                           int idx)

dbXML API

Copyright (c) 1999-2001 The dbXML Group, All rights reserved