bes
Updated for version 3.20.6
|
33 #include "BESFileContainer.h"
34 #include "TheBESKeys.h"
37 #include "BESUncompressManager3.h"
38 #include "BESUncompressCache.h"
40 #include "BESForbiddenError.h"
54 BESFileContainer::BESFileContainer(
const string &sym_name,
const string &real_name,
const string &type) :
55 BESContainer(sym_name, real_name, type), _cached(false), _target(
"")
57 string::size_type dotdot = real_name.find(
"..");
58 if (dotdot != string::npos) {
59 string s = (string)
"'../' not allowed in container real name " + real_name;
69 BESContainer(copy_from), _cached(copy_from._cached), _target(copy_from._target)
96 BESDEBUG(
"cache2",
"Entering " << __PRETTY_FUNCTION__ <<
", real_name: " <<
get_real_name() << endl);
109 BESDEBUG(
"cache2",
"Cached as: " << _target << endl);
113 BESDEBUG(
"cache2",
"Not cached" << endl);
128 BESDEBUG(
"cache2",
"Entering " << __PRETTY_FUNCTION__ <<
", _cached: " << _cached <<
", _target: " << _target << endl);
144 strm << BESIndent::LMarg <<
"BESFileContainer::dump - (" << (
void *)
this <<
")" << endl;
147 BESIndent::UnIndent();
Holds real data, container type and constraint for symbolic name read from persistence.
static BESUncompressCache * get_instance()
virtual BESContainer * ptr_duplicate()
duplicate this instances of BESFileContainer
virtual bool uncompress(const std::string &src, std::string &target, BESFileLockingCache *cache)
If the file 'src' should be uncompressed, do so and return a new file name on the value-result param ...
virtual void unlock_and_close(const std::string &target)
error thrown if the BES is not allowed to access the resource requested
A container is something that holds data. E.G., a netcdf file or a database entry.
virtual void dump(std::ostream &strm) const
Displays debug information about this object.
std::string get_real_name() const
retrieve the real name for this container, such as a file name.
virtual bool release()
release the file
virtual std::string access()
returns the name of a file to access for this container, uncompressing if necessary.
void _duplicate(BESContainer ©_to)
duplicate this instance into the passed container
virtual void dump(std::ostream &strm) const
dumps information about this object