LogCabin
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Member Functions | Public Attributes
LogCabin::Storage::SegmentedLog::Segment Struct Reference

An open or closed segment. More...

List of all members.

Classes

struct  Record
 Describes a log entry record within a segment. More...

Public Member Functions

 Segment ()
 Default constructor.
std::string makeClosedFilename () const
 Return a filename of the right form for a closed segment.

Public Attributes

bool isOpen
 True for the open segment, false for closed segments.
uint64_t startIndex
 The index of the first entry in the segment.
uint64_t endIndex
 The index of the last entry in the segment, or startIndex - 1 if the segment is open and empty.
uint64_t bytes
 Size in bytes of the valid entries stored in the file plus the version number at the start of the file.
std::string filename
 The name of the file within dir containing this segment.
std::deque< Recordentries
 The entries in this segment, from startIndex to endIndex, inclusive.

Detailed Description

An open or closed segment.

These are stored in segmentsByStartIndex.

Definition at line 321 of file SegmentedLog.h.


Constructor & Destructor Documentation

Default constructor.

Sets the segment to invalid.

Definition at line 326 of file SegmentedLog.cc.


Member Function Documentation

Return a filename of the right form for a closed segment.

See also filename.

Definition at line 337 of file SegmentedLog.cc.


Member Data Documentation

True for the open segment, false for closed segments.

Definition at line 357 of file SegmentedLog.h.

The index of the first entry in the segment.

If the segment is open and empty, this may not exist yet and will be logStartIndex.

Definition at line 362 of file SegmentedLog.h.

The index of the last entry in the segment, or startIndex - 1 if the segment is open and empty.

Definition at line 367 of file SegmentedLog.h.

Size in bytes of the valid entries stored in the file plus the version number at the start of the file.

Definition at line 372 of file SegmentedLog.h.

The name of the file within dir containing this segment.

Definition at line 376 of file SegmentedLog.h.

The entries in this segment, from startIndex to endIndex, inclusive.

Definition at line 380 of file SegmentedLog.h.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines