SegmentAllocationNode Struct Reference

SegmentAllocationNode is the allocation map for a run of extents in a RandomAllocationSegmentBase. More...

#include <RandomAllocationSegmentBaseImpl.h>

Inheritance diagram for SegmentAllocationNode:

StoredNode List of all members.

Public Member Functions

ExtentEntrygetExtentEntry (uint i)
ExtentEntry const & getExtentEntry (uint i) const

Public Attributes

BlockNum nPagesPerExtent
 Number of pages in one extent, including the extent allocation node itself (so actual data capacity per extent is one less).
PageId nextSegAllocPageId
 Forward link to the next SegmentAllocationNode, or NULL_PAGE_ID for the last one.
uint nExtents
 Number of extents mapped by this node.
MagicNumber magicNumber
 Magic number identifying the derived StoredNode class.

Static Public Attributes

static const MagicNumber MAGIC_NUMBER = 0xa3db80b98208bfd4LL

Classes

struct  ExtentEntry
 Allocation status for a single extent mapped by this node. More...

Detailed Description

SegmentAllocationNode is the allocation map for a run of extents in a RandomAllocationSegmentBase.

Definition at line 44 of file RandomAllocationSegmentBaseImpl.h.


Member Function Documentation

ExtentEntry& SegmentAllocationNode::getExtentEntry ( uint  i  )  [inline]

Definition at line 84 of file RandomAllocationSegmentBaseImpl.h.

Referenced by RandomAllocationSegmentBase::allocatePageIdFromSegment(), VersionedRandomAllocationSegment::backupAllocationNodes(), RandomAllocationSegmentBase::deallocatePageId(), VersionedRandomAllocationSegment::deallocateSinglePage(), RandomAllocationSegmentBase::formatPageExtentsTemplate(), VersionedRandomAllocationSegment::getOldPageIds(), VersionedRandomAllocationSegment::locateDataPages(), VersionedRandomAllocationSegment::restoreFromBackup(), RandomAllocationSegmentBase::tallySegAllocNodePages(), VersionedRandomAllocationSegment::updateExtentEntry(), and VersionedRandomAllocationSegment::validateFreePageCount().

00085     {
00086         assert(i < nExtents);
00087         return reinterpret_cast<ExtentEntry *>(this+1)[i];
00088     }

ExtentEntry const& SegmentAllocationNode::getExtentEntry ( uint  i  )  const [inline]

Definition at line 90 of file RandomAllocationSegmentBaseImpl.h.

00091     {
00092         assert(i < nExtents);
00093         return reinterpret_cast<ExtentEntry const *>(this+1)[i];
00094     }


Member Data Documentation

const MagicNumber SegmentAllocationNode::MAGIC_NUMBER = 0xa3db80b98208bfd4LL [static]

Definition at line 47 of file RandomAllocationSegmentBaseImpl.h.

BlockNum SegmentAllocationNode::nPagesPerExtent

Number of pages in one extent, including the extent allocation node itself (so actual data capacity per extent is one less).

This is redundant across all SegmentAllocationNodes in the same RandomAllocationSegment.

Definition at line 67 of file RandomAllocationSegmentBaseImpl.h.

Referenced by VersionedRandomAllocationSegment::allocateAllocNodes(), RandomAllocationSegmentBase::allocatePageIdFromSegment(), and RandomAllocationSegmentBase::format().

PageId SegmentAllocationNode::nextSegAllocPageId

Forward link to the next SegmentAllocationNode, or NULL_PAGE_ID for the last one.

This is mostly redundant, since the PageId's of SegmentAllocationNodes can always be computed. However, it is not completely redundant since it marks the last node (rather than inferring it from the underlying segment size, which may be unreliable after recovery).

Definition at line 77 of file RandomAllocationSegmentBaseImpl.h.

Referenced by VersionedRandomAllocationSegment::allocateAllocNodes(), RandomAllocationSegmentBase::allocatePageIdFromSegment(), VersionedRandomAllocationSegment::backupAllocationNodes(), RandomAllocationSegmentBase::format(), VersionedRandomAllocationSegment::getOldPageIds(), VersionedRandomAllocationSegment::locateDataPages(), VersionedRandomAllocationSegment::restoreFromBackup(), and RandomAllocationSegmentBase::tallySegAllocNodePages().

uint SegmentAllocationNode::nExtents

Number of extents mapped by this node.

Definition at line 82 of file RandomAllocationSegmentBaseImpl.h.

Referenced by VersionedRandomAllocationSegment::allocateAllocNodes(), VersionedRandomAllocationSegment::allocateExtAllocNodes(), RandomAllocationSegmentBase::allocatePageIdFromSegment(), VersionedRandomAllocationSegment::backupAllocationNodes(), RandomAllocationSegmentBase::format(), RandomAllocationSegmentBase::formatPageExtentsTemplate(), VersionedRandomAllocationSegment::getOldPageIds(), VersionedRandomAllocationSegment::locateDataPages(), VersionedRandomAllocationSegment::restoreFromBackup(), and RandomAllocationSegmentBase::tallySegAllocNodePages().

MagicNumber StoredNode::magicNumber [inherited]

Magic number identifying the derived StoredNode class.

Definition at line 394 of file SegPageLock.h.

Referenced by Database::init(), and BTreeVerifier::verifyNode().


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