Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1BucketBase.html
Дата изменения: Unknown Дата индексирования: Mon Feb 14 21:33:07 2011 Кодировка: Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п |
Abstract base class for Bucket classes. More...
#include <BucketBase.h>
Public Member Functions | |
BucketBase (BucketFile *file, Int64 startOffset, uInt bucketSize, uInt nrOfBuckets) | |
Create the bucket access for (part of) a file. | |
virtual | ~BucketBase () |
Detach the file. | |
Bool | flush () |
Flush the cached buckets. | |
virtual void | resync (uInt nrBucket) |
Resynchronize the object (after another process updated the file). | |
uInt | nBucket () const |
Get the current nr of buckets in the file. | |
void | extend (uInt nrBucket) |
Extend the file with the given number of buckets. | |
void | setWritten () |
Set that data has been written. | |
Protected Member Functions | |
BucketBase (const BucketBase &) | |
Copy constructor is not possible. | |
BucketBase & | operator= (const BucketBase &) |
Assignment is not possible. | |
virtual void | doFlush ()=0 |
Do the actual flushing. | |
virtual void | doResync ()=0 |
Do the actual resync-ing. | |
virtual void | doExtend (uInt nrBucket)=0 |
Do the actual extension of the file. | |
virtual void | initializeBuckets (uInt bucketNr)=0 |
Initialize the bucket buffer. | |
Protected Attributes | |
BucketFile * | itsFile |
The file used. | |
Int64 | itsStartOffset |
The starting offsets of the buckets in the file. | |
uInt | itsBucketSize |
The bucket size. | |
uInt | itsCurNrOfBuckets |
The current nr of buckets in the file. | |
uInt | itsNewNrOfBuckets |
The new nr of buckets in the file (after extension). | |
Bool | itsHasWritten |
Have data been written? |
Abstract base class for Bucket classes.
Internal
BucketBase is the abstract baseclass for the various Bucket classes like BucketMapped and BucketBuffered. It is used by TSMCube to do the IO in the required way.
Definition at line 57 of file BucketBase.h.
casa::BucketBase::BucketBase | ( | BucketFile * | file, | |
Int64 | startOffset, | |||
uInt | bucketSize, | |||
uInt | nrOfBuckets | |||
) |
Create the bucket access for (part of) a file.
The file part starts at startOffset. Its length is bucketSize*nrOfBuckets bytes. If the file is smaller, the remainder is indicated as an extension similarly to the behaviour of function extend.
Referenced by nBucket().
virtual casa::BucketBase::~BucketBase | ( | ) | [virtual] |
Detach the file.
The BucketFile is not closed.
casa::BucketBase::BucketBase | ( | const BucketBase & | ) | [protected] |
Copy constructor is not possible.
virtual void casa::BucketBase::doExtend | ( | uInt | nrBucket | ) | [protected, pure virtual] |
Do the actual extension of the file.
Note that itsNewNrOfBuckets has been increased before doExtend is called.
Implemented in casa::BucketBuffered, and casa::BucketMapped.
virtual void casa::BucketBase::doFlush | ( | ) | [protected, pure virtual] |
Do the actual flushing.
Implemented in casa::BucketBuffered, and casa::BucketMapped.
virtual void casa::BucketBase::doResync | ( | ) | [protected, pure virtual] |
Do the actual resync-ing.
Implemented in casa::BucketBuffered, and casa::BucketMapped.
void casa::BucketBase::extend | ( | uInt | nrBucket | ) |
Extend the file with the given number of buckets.
The buckets get initialized when they are acquired (using getBucket) for the first time.
Bool casa::BucketBase::flush | ( | ) |
Flush the cached buckets.
Possibly remaining uninitialized buckets will be initialized first. A True status is returned if buckets had to be written. The actual flushing is done using doFlush
in the derived class.
virtual void casa::BucketBase::initializeBuckets | ( | uInt | bucketNr | ) | [protected, pure virtual] |
Initialize the bucket buffer.
The uninitialized buckets before this bucket are also initialized.
Implemented in casa::BucketBuffered, and casa::BucketMapped.
uInt casa::BucketBase::nBucket | ( | ) | const [inline] |
Get the current nr of buckets in the file.
Definition at line 60 of file BucketBase.h.
References BucketBase().
BucketBase& casa::BucketBase::operator= | ( | const BucketBase & | ) | [protected] |
Assignment is not possible.
virtual void casa::BucketBase::resync | ( | uInt | nrBucket | ) | [virtual] |
Resynchronize the object (after another process updated the file).
It remaps the file if the nr of buckets has changed. the new sizes.
void casa::BucketBase::setWritten | ( | ) | [inline] |
Set that data has been written.
Definition at line 69 of file BucketBase.h.
uInt casa::BucketBase::itsBucketSize [protected] |
The bucket size.
Definition at line 99 of file BucketBase.h.
uInt casa::BucketBase::itsCurNrOfBuckets [protected] |
The current nr of buckets in the file.
Definition at line 101 of file BucketBase.h.
BucketFile* casa::BucketBase::itsFile [protected] |
The file used.
Definition at line 95 of file BucketBase.h.
Bool casa::BucketBase::itsHasWritten [protected] |
Have data been written?
Definition at line 105 of file BucketBase.h.
Referenced by casa::BucketMapped::getrwBucket().
uInt casa::BucketBase::itsNewNrOfBuckets [protected] |
The new nr of buckets in the file (after extension).
Definition at line 103 of file BucketBase.h.
Int64 casa::BucketBase::itsStartOffset [protected] |
The starting offsets of the buckets in the file.
Definition at line 97 of file BucketBase.h.