LcsClusterAccessBase.h

Go to the documentation of this file.
00001 /*
00002 // $Id: //open/dev/fennel/lucidera/colstore/LcsClusterAccessBase.h#7 $
00003 // Fennel is a library of data storage and processing components.
00004 // Copyright (C) 2005-2009 LucidEra, Inc.
00005 // Copyright (C) 2005-2009 The Eigenbase Project
00006 //
00007 // This program is free software; you can redistribute it and/or modify it
00008 // under the terms of the GNU General Public License as published by the Free
00009 // Software Foundation; either version 2 of the License, or (at your option)
00010 // any later version approved by The Eigenbase Project.
00011 //
00012 // This program is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with this program; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 */
00021 
00022 #ifndef Fennel_LcsClusterAccessBase_Included
00023 #define Fennel_LcsClusterAccessBase_Included
00024 
00025 #include "fennel/tuple/TupleData.h"
00026 #include "fennel/lucidera/colstore/LcsClusterNode.h"
00027 #include "fennel/btree/BTreeDescriptor.h"
00028 
00029 FENNEL_BEGIN_NAMESPACE
00030 
00034 class FENNEL_LCS_EXPORT LcsClusterAccessBase
00035     : public boost::noncopyable
00036 {
00037 protected:
00042     TupleData bTreeTupleData;
00043 
00047     SegmentAccessor segmentAccessor;
00048 
00053     ClusterPageLock clusterLock;
00054 
00058     PageId clusterPageId;
00059 
00063     LcsRid bTreeRid;
00064 
00068     uint nClusterCols;
00069 
00074     uint16_t *lastVal;
00075 
00082     uint16_t *firstVal;
00083 
00087     uint *nVal;
00088 
00093     uint16_t *delta;
00094 
00098     LcsRid readRid();
00099 
00103     PageId readClusterPageId();
00104 
00110     void setHdrOffsets(PConstLcsClusterNode pHdr);
00111 
00112 public:
00113     explicit LcsClusterAccessBase(BTreeDescriptor const &treeDescriptor);
00114 
00118     uint getNumClusterCols()
00119     {
00120         return nClusterCols;
00121     }
00122 
00126     void setNumClusterCols(uint nCols)
00127     {
00128         nClusterCols = nCols;
00129     }
00130 
00134     void unlockClusterPage();
00135 };
00136 
00137 FENNEL_END_NAMESPACE
00138 
00139 #endif
00140 
00141 // End LcsClusterAccessBase.h

Generated on Mon Jun 22 04:00:19 2009 for Fennel by  doxygen 1.5.1