bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
AggMemberDataset Class Referenceabstract

#include <AggMemberDataset.h>

Inheritance diagram for AggMemberDataset:
Inheritance graph
Collaboration diagram for AggMemberDataset:
Collaboration graph

Public Member Functions

 AggMemberDataset (const AggMemberDataset &proto)
 
 AggMemberDataset (std::string location)
 
virtual void fillDimensionCacheByUsingDDS ()=0
 
virtual void flushDimensionCache ()=0
 
virtual unsigned int getCachedDimensionSize (const std::string &dimName) const=0
 
virtual const libdap::DDS * getDDS ()=0
 
const std::string & getLocation () const
 
virtual bool isDimensionCached (const std::string &dimName) const=0
 
virtual void loadDimensionCache (std::istream &istr)=0
 
AggMemberDatasetoperator= (const AggMemberDataset &rhs)
 
virtual void saveDimensionCache (std::ostream &ostr)=0
 
virtual void setDimensionCacheFor (const Dimension &dim, bool throwIfFound)=0
 

Detailed Description

Abstract helper superclass for allowing lazy access to the DDS for an aggregation. This is used during a read() if the dataset is needed in an aggregation.

Note: This inherits from RCObject so is a ref-counted object to avoid making excessive copies of it and especially of any contained DDS.

Currently, there are two concrete subclasses:

o AggMemberDatasetUsingLocationRef: to load an external location into a DDS as needed (lazy eval so not loaded unless in the output of read() )

o AggMemberDatasetDDSWrapper: to hold a pre-loaded DDS for the case of virtual or pre-loaded datasets (data declared in NcML file, nested aggregations, e.g.) In this case, getLocation() is presumed empty().

Definition at line 63 of file AggMemberDataset.h.

Member Function Documentation

◆ fillDimensionCacheByUsingDDS()

virtual void agg_util::AggMemberDataset::fillDimensionCacheByUsingDDS ( )
pure virtual

Uses the getDDS() call in order to find all named dimensions within it and to seed them into the dimension cache table for faster later lookups. Potentially slow!

◆ flushDimensionCache()

virtual void agg_util::AggMemberDataset::flushDimensionCache ( )
pure virtual

Flush out any cache for the Dimensions so that it will have to be loaded.

◆ getCachedDimensionSize()

virtual unsigned int agg_util::AggMemberDataset::getCachedDimensionSize ( const std::string & dimName) const
pure virtual

Get the size of the given dimension named dimName cached within the dataset. If not found in cache, throws.

If a cached value exists from a prior load of the DDS using loadDimensionCacheFromDDS() or from a call to setDimensionCacheFor(), return that.

Otherwise, this must load the DDS to get the values.

Implementation is left up to subclasses for efficiency.

Returns
the size of the dimension if found
Exceptions
agg_util::DimensionNotFoundExceptionif not located via any means.

◆ getDDS()

virtual const libdap::DDS * agg_util::AggMemberDataset::getDDS ( )
pure virtual

Return the DDS for the location, loading it in if it hasn't yet been loaded. Can return NULL if there's a problem. (Not const due to lazy eval)

Returns
the DDS ptr containing the loaded dataset or NULL.

◆ getLocation()

const std::string & agg_util::AggMemberDataset::getLocation ( ) const

The location to which the AggMemberDataset refers Note: this could be "" for some subclasses if they are virtual or nested

◆ isDimensionCached()

virtual bool agg_util::AggMemberDataset::isDimensionCached ( const std::string & dimName) const
pure virtual

Return whether the dimension is already cached, or would have to be loaded to be found.

◆ loadDimensionCache()

virtual void agg_util::AggMemberDataset::loadDimensionCache ( std::istream & istr)
pure virtual

Load the values in the dimension cache from the input stream

◆ saveDimensionCache()

virtual void agg_util::AggMemberDataset::saveDimensionCache ( std::ostream & ostr)
pure virtual

Append the values in the dimension cache to the output stream

◆ setDimensionCacheFor()

virtual void agg_util::AggMemberDataset::setDimensionCacheFor ( const Dimension & dim,
bool throwIfFound )
pure virtual

Seed the dimension cache using the given dimension, so that later calls to getDimensionSize for dim.name will return the dim.size immediately without checking or loading the actual DDS.

If it already exists and throwIfFound then will throw an AggregationException.

If it exists and !throwIfFound, will replace the old one.

Parameters
dimthe dimension to seed
iftrue, throw if name take. Else replace original.

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