Package db

# Class Database.DBBufferFileManager

java.lang.Object
db.Database.DBBufferFileManager

All Implemented Interfaces:
  `BufferFileManager`

Enclosing class:
  `Database`

protected class Database.DBBufferFileManager extends Object implements BufferFileManager

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `DBBufferFileManager()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `File`
  `getBufferFile(int version)`
  Get the buffer file corresponding to a specified version.
  `File`
  `getChangeDataFile(int version)`
  Get the change data buffer file corresponding to the specified version.
  `File`
  `getChangeMapFile()`
  Returns the change map file corresponding to this DB if one is defined.
  `int`
  `getCurrentVersion()`
  Returns the current version.
  `File`
  `getVersionFile(int version)`
  Get the buffer version file corresponding to a specified version.
  `void`
  `updateEnded(long checkinId)`
  Callback indicating that a buffer file update has ended without creating a new version.
  `void`
  `versionCreated(int version, String comment, long checkinId)`
  Callback for when a buffer file is created.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DBBufferFileManager

    protected DBBufferFileManager()

- ## Method Details

  - ### getCurrentVersion

    public int getCurrentVersion()
    Description copied from interface: `BufferFileManager`
    Returns the current version. A value of 0 indicates that the first buffer file has not yet been created.
    Specified by:
      `getCurrentVersion` in interface `BufferFileManager`

  - ### getBufferFile

    public File getBufferFile(int version)
    Description copied from interface: `BufferFileManager`
    Get the buffer file corresponding to a specified version.
    Specified by:
      `getBufferFile` in interface `BufferFileManager`
    Parameters:
      `version` -
    Returns:
      database buffer file.

  - ### getVersionFile

    public File getVersionFile(int version)
    Description copied from interface: `BufferFileManager`
    Get the buffer version file corresponding to a specified version. This file contains data corresponding to a specified buffer file version and those buffers which have been modified in the next version (version+1). May return null if version files not used.
    Specified by:
      `getVersionFile` in interface `BufferFileManager`
    Parameters:
      `version` - version of the original buffer file to be reconstructed
    Returns:
      buffer version file.

  - ### getChangeMapFile

    public File getChangeMapFile()
    Description copied from interface: `BufferFileManager`
    Returns the change map file corresponding to this DB if one is defined. This file tracks all buffers which have been modified during a save operation.
    Specified by:
      `getChangeMapFile` in interface `BufferFileManager`

  - ### getChangeDataFile

    public File getChangeDataFile(int version)
    Description copied from interface: `BufferFileManager`
    Get the change data buffer file corresponding to the specified version. This file contains application specific changes which were made going from the specified version to the next version (version+1). May return null if change data files are not used.
    Specified by:
      `getChangeDataFile` in interface `BufferFileManager`
    Parameters:
      `version` - version of the original buffer file which was changed
    Returns:
      change data buffer file.

  - ### versionCreated

    public void versionCreated(int version, String comment, long checkinId) throws FileNotFoundException
    Description copied from interface: `BufferFileManager`
    Callback for when a buffer file is created.
    Specified by:
      `versionCreated` in interface `BufferFileManager`
    Parameters:
      `version` -
      `comment` -
      `checkinId` - associated checkinId
    Throws:
      `FileNotFoundException` - database files not found

  - ### updateEnded

    public void updateEnded(long checkinId)
    Description copied from interface: `BufferFileManager`
    Callback indicating that a buffer file update has ended without creating a new version. This method terminates the checkin session.
    Specified by:
      `updateEnded` in interface `BufferFileManager`
    Parameters:
      `checkinId` - associated checkinId