LinearDeviceSegmentParams Struct Reference

LinearDeviceSegmentParams defines initialization parameters for LinearDeviceSegment. More...

#include <LinearDeviceSegment.h>

List of all members.

Public Member Functions

 LinearDeviceSegmentParams ()

Public Attributes

BlockId firstBlockId
 BlockId of the first page in the segment; the owning device must already be registered with the cache.
BlockNum nPagesMin
 Minimum number of pages in segment.
BlockNum nPagesAllocated
 Number of pages considered allocated in segment on construction.
BlockNum nPagesIncrement
 When the device needs to be extended to satisfy an allocation, the number of pages by which to extend it.
BlockNum nPagesMax
 Maximum number of pages in the segment; the device will not be extended beyond this.


Detailed Description

LinearDeviceSegmentParams defines initialization parameters for LinearDeviceSegment.

Definition at line 36 of file LinearDeviceSegment.h.


Constructor & Destructor Documentation

LinearDeviceSegmentParams::LinearDeviceSegmentParams (  )  [explicit]

Definition at line 31 of file LinearDeviceSegment.cpp.

References firstBlockId, MAXU, nPagesAllocated, nPagesIncrement, nPagesMax, nPagesMin, and NULL_BLOCK_ID.

00032 {
00033     firstBlockId = NULL_BLOCK_ID;
00034     nPagesMin = 0;
00035     nPagesAllocated = 0;
00036     nPagesIncrement = 1;
00037     nPagesMax = MAXU;
00038 }


Member Data Documentation

BlockId LinearDeviceSegmentParams::firstBlockId

BlockId of the first page in the segment; the owning device must already be registered with the cache.

Definition at line 42 of file LinearDeviceSegment.h.

Referenced by Database::allocateHeader(), Database::createDataSegment(), SegStorageTestBase::createLinearDeviceSegment(), Database::createShadowLog(), Database::createTxnLogSegment(), LinearDeviceSegment::LinearDeviceSegment(), LinearDeviceSegmentParams(), Database::loadHeader(), SegmentFactory::newTempDeviceSegment(), and SparseBitmapTest::openStorage().

BlockNum LinearDeviceSegmentParams::nPagesMin

Minimum number of pages in segment.

If the device isn't big enough, it is automatically extended when the segment is created.

Definition at line 48 of file LinearDeviceSegment.h.

Referenced by Database::createDataDevice(), SegStorageTestBase::createLinearDeviceSegment(), Database::createShadowLog(), Database::createTxnLogSegment(), LinearDeviceSegment::LinearDeviceSegment(), LinearDeviceSegmentParams(), and Database::readDeviceParams().

BlockNum LinearDeviceSegmentParams::nPagesAllocated

Number of pages considered allocated in segment on construction.

Must be less than nPagesMax (or MAXU, in which case all pages are considered allocated).

Definition at line 55 of file LinearDeviceSegment.h.

Referenced by Database::createDataSegment(), SegStorageTestBase::createLinearDeviceSegment(), Database::createShadowLog(), Database::createTxnLogSegment(), LinearDeviceSegment::LinearDeviceSegment(), LinearDeviceSegmentParams(), Database::loadHeader(), SegmentFactory::newTempDeviceSegment(), SparseBitmapTest::openStorage(), and Database::readDeviceParams().

BlockNum LinearDeviceSegmentParams::nPagesIncrement

When the device needs to be extended to satisfy an allocation, the number of pages by which to extend it.

If 0, no auto-extension is performed.

Definition at line 61 of file LinearDeviceSegment.h.

Referenced by Database::createShadowLog(), Database::createTxnLogSegment(), LinearDeviceSegment::LinearDeviceSegment(), LinearDeviceSegmentParams(), and Database::readDeviceParams().

BlockNum LinearDeviceSegmentParams::nPagesMax

Maximum number of pages in the segment; the device will not be extended beyond this.

If MAXU, segment size is limited only by disk space.

Definition at line 67 of file LinearDeviceSegment.h.

Referenced by Database::createShadowLog(), Database::createTxnLogSegment(), LinearDeviceSegment::LinearDeviceSegment(), LinearDeviceSegmentParams(), Database::loadHeader(), and Database::readDeviceParams().


The documentation for this struct was generated from the following files:
Generated on Mon Jun 22 04:00:39 2009 for Fennel by  doxygen 1.5.1