Package db.buffers
Interface BufferFileManager
- All Known Implementing Classes:
Database.DBBufferFileManager
public interface BufferFileManager
BufferFileManager
provides an interface for a
BufferFile manager who understands the storage for the various
versions of BufferFiles associated with a single database.-
Method Summary
Modifier and TypeMethodDescriptiongetBufferFile
(int version) Get the buffer file corresponding to a specified version.getChangeDataFile
(int version) Get the change data buffer file corresponding to the specified version.Returns the change map file corresponding to this DB if one is defined.int
Returns the current version.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.
-
Method Details
-
getCurrentVersion
int getCurrentVersion()Returns the current version. A value of 0 indicates that the first buffer file has not yet been created. -
getBufferFile
Get the buffer file corresponding to a specified version.- Parameters:
version
-- Returns:
- database buffer file.
-
getVersionFile
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.- Parameters:
version
- version of the original buffer file to be reconstructed- Returns:
- buffer version file.
-
getChangeDataFile
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.- Parameters:
version
- version of the original buffer file which was changed- Returns:
- change data buffer file.
-
getChangeMapFile
File getChangeMapFile()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. -
versionCreated
Callback for when a buffer file is created.- Parameters:
version
-comment
-checkinId
- associated checkinId- Throws:
FileNotFoundException
- database files not found
-
updateEnded
void updateEnded(long checkinId) Callback indicating that a buffer file update has ended without creating a new version. This method terminates the checkin session.- Parameters:
checkinId
- associated checkinId
-