Rose
Public Member Functions | List of all members
rose::CacheLocalStore Class Referenceabstract

A pure virtual class specifying the interface to a cache store system. More...

#include <Cache.h>

Inheritance diagram for rose::CacheLocalStore:
Inheritance graph
[legend]

Public Member Functions

virtual CacheError create (const CacheObject &object)=0
 Create an item on a Cache. More...
 
virtual bool find (const CacheObject &object)=0
 Find an item on a Cache. More...
 
virtual std::ofstream openWrite (const CacheObject &object, bool temp)=0
 Open a cache object for writing. More...
 
virtual void moveFromTemp (const CacheObject &object)=0
 Move object from temporary cache location to permanent cache location. More...
 
virtual void setCacheTime (const CacheObject &object, std::chrono::system_clock::duration cacheTimeInc)=0
 Modify the object cache time. More...
 
virtual void removeTemp (const CacheObject &object)=0
 Remove a temporary cache location. More...
 
virtual std::ifstream openRead (const CacheObject &object)=0
 Open a cache object for reading. More...
 
virtual std::optional< std::string > fileSystemName (const CacheObject &object) const
 Get a filesystem name locator for the object, if available. More...
 

Detailed Description

A pure virtual class specifying the interface to a cache store system.

Member Function Documentation

◆ create()

virtual CacheError rose::CacheLocalStore::create ( const CacheObject object)
pure virtual

Create an item on a Cache.

Parameters
objectThe cache object to be created.
Returns
A CacheError code.

Implemented in rose::CacheFileSystem.

◆ fileSystemName()

virtual std::optional<std::string> rose::CacheLocalStore::fileSystemName ( const CacheObject object) const
inlinevirtual

Get a filesystem name locator for the object, if available.

Returns
A std::optional<std::string>

Reimplemented in rose::CacheFileSystem.

◆ find()

virtual bool rose::CacheLocalStore::find ( const CacheObject object)
pure virtual

Find an item on a Cache.

Parameters
objectThe cache object to be found.
Returns
A CacheError code.

Implemented in rose::CacheFileSystem.

◆ moveFromTemp()

virtual void rose::CacheLocalStore::moveFromTemp ( const CacheObject object)
pure virtual

Move object from temporary cache location to permanent cache location.

Parameters
objectThe object to move from a temporary to permanent location.

Implemented in rose::CacheFileSystem.

◆ openRead()

virtual std::ifstream rose::CacheLocalStore::openRead ( const CacheObject object)
pure virtual

Open a cache object for reading.

Parameters
objectThe object to open for reading.
Returns
A std::istream to read from.

Implemented in rose::CacheFileSystem.

◆ openWrite()

virtual std::ofstream rose::CacheLocalStore::openWrite ( const CacheObject object,
bool  temp 
)
pure virtual

Open a cache object for writing.

Parameters
objectThe cache object to open for writing
tempTrue if a temporary should be opened to use write then move idiom.
Returns
A std::ostream to write to.

Implemented in rose::CacheFileSystem.

◆ removeTemp()

virtual void rose::CacheLocalStore::removeTemp ( const CacheObject object)
pure virtual

Remove a temporary cache location.

This is used when an attempt to update a cached object either failed, or did not result in new data.

Parameters
objectThe object for which the temporary should be removed.

Implemented in rose::CacheFileSystem.

◆ setCacheTime()

virtual void rose::CacheLocalStore::setCacheTime ( const CacheObject object,
std::chrono::system_clock::duration  cacheTimeInc 
)
pure virtual

Modify the object cache time.

Parameters
objectThe cache object to modify the object cache time on.
cacheTimeIncThe amount to increment the object cache time by, or 0 to set it to the current system time.

Implemented in rose::CacheFileSystem.


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