Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions

Data_SplitSpace< T > Class Template Reference

#include <Data_SplitSpace.hpp>

Inheritance diagram for Data_SplitSpace< T >:

Data_ISplitSpace

List of all members.


Detailed Description

template<class T>
class Data_SplitSpace< T >

This manages space which is not located in one page.

Definition at line 46 of file Data_SplitSpace.hpp.


Public Types

typedef SAPDB_Invalidatable
< SAPDB_Int,-1 > 
PartNo
 Definition of partno to identify one part of the split space.

Public Member Functions

void AppendPart (T &Page, SAPDB_UInt Length, SAPDB_Byte *Value)
 A complete part is appended to the part list.
bool CheckAccessMode (Data_AccessMode AccessMode) const
 returns true, if all pages have the same given access mode.
virtual PartNo CurrentPart () const
 Return the number of the current part.
 Data_SplitSpace (SAPDBMem_IRawAllocator &Allocator)
 default constructor
void Deassign (bool isOK=true)
 All parts are released, if ok, then release and update pages.
void Delete ()
 release all pages and call Delete() for all used parts
T & GetCurrentPage ()
 The current used page is returned as reference.
const T & GetCurrentPage () const
 The current used page is returned as const reference.
Data_PageNo GetFirstPageNo () const
 returns the first pageno (prev or first of split space)
SAPDB_UInt GetNumAdditionalPagesAppended ()
 return the number of pages added during the last write operation to the split space.
const T & GetPage (PartNo part) const
 The const reference to the page of the specified part is returned.
T & GetPage (PartNo part)
 The reference to the page of the specified part is returned.
virtual void GetPart (PartNo Part, SAPDB_UInt &Length, SAPDB_Byte *&Value) const
 From the specified part is the length and a pointer returned.
T & GetPrevPage ()
 returns the prev page handler which can be used during reservation
bool Initialize ()
 pre allocate for three parts.
bool IsAssigned () const
 return true, if first part page is assigned.
virtual SAPDB_UInt Length () const
 The sum of length of all used parts of the space is returned in bytes.
bool NewPageWasAppended ()
 Returns true if the internal counter for new allocated pages is greater than 0.
void Reassign (bool bKeepFirstPart=false)
void Reorder ()
 max part is moved to 0 and vice versa
void SetAccessMode (Data_AccessMode AccessMode)
 If IsAssigned , all pages are set to AccessMode.
void SetNewPageWasAppended ()
 Increments the internal counter which counts new allocated pages.
void SetPart (SAPDB_UInt Length, SAPDB_Byte *Value)
 The description of a new space is set to to current part.
T & UseNextPart ()
 This part must not be used before.
void WriteToTrace (const char *Title) const
 write important data to knltrace.
 ~Data_SplitSpace ()
 The destructor deallocates all resources.

Private Attributes

PartNo m_CurrentPart
 the currently used part
SAPDB_UInt m_NumPagesAppended
 number of added pages during last write
Container_Vector< Partm_Parts
 the list parts
m_PrevPage
 This is needed if the SplitSpace is used to append space to an existing page chain. m_PrevPage is then the last page in the chain before the append operation, but there is not enough space on this page and the split space begins at the next (new) page. The original last last must then be hold in m_PrevPage because otherwise there is no synchronization with the savepoint.

Classes

class  Part
 Consists of the Page and the Length, Value within this Page. More...

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index