#include <StorageCollection.h>
StorageCollection represents a global repository of JSONStorage s. Here temporary result Collections and permanently named Collections are managed.
◆ StorageCollection() [1/2]
◆ ~StorageCollection()
StorageCollection::~StorageCollection |
( |
| ) |
|
|
virtual |
◆ StorageCollection() [2/2]
StorageCollection::StorageCollection |
( |
| ) |
|
|
inlineprotected |
◆ addDependency()
void StorageCollection::addDependency |
( |
const std::shared_ptr< JSONStorage > & |
store, |
|
|
const std::shared_ptr< JSONStorage > & |
dependson |
|
) |
| |
◆ addTemporaryStorage() [1/2]
unsigned long StorageCollection::addTemporaryStorage |
( |
| ) |
|
◆ addTemporaryStorage() [2/2]
unsigned long StorageCollection::addTemporaryStorage |
( |
const std::shared_ptr< JSONStorage > & |
storage | ) |
|
Adds an existing JSONStorage as temporary result.
- Parameters
-
- Returns
- The unique result ID
◆ chooseStoragesToRemove()
std::vector< std::pair< JSONStorage *, size_t > > StorageCollection::chooseStoragesToRemove |
( |
long long |
toFree, |
|
|
const std::vector< JSONStorage * > & |
except |
|
) |
| const |
|
protected |
◆ ensureSpace()
void StorageCollection::ensureSpace |
( |
unsigned long long |
estimatedSize, |
|
|
const std::shared_ptr< JSONStorage > & |
withoutDependency = nullptr |
|
) |
| |
Ensures that the system has enough space for the comming operations. Not enough space is available, JSONStorage s will be serialized to disk and removed from memory according to a specified heuristic.
- Parameters
-
estimatedSize | The estimated required size (in Bytes) for the coming operation |
withoutDependency | A JSONStorage that cannot be removed from memory for the coming operation. |
◆ estimatedParsedSize()
size_t StorageCollection::estimatedParsedSize |
( |
| ) |
const |
◆ estimatedSize()
size_t StorageCollection::estimatedSize |
( |
| ) |
const |
◆ estimatedStorageSize()
long long StorageCollection::estimatedStorageSize |
( |
| ) |
const |
◆ estimateHierarchySize()
size_t StorageCollection::estimateHierarchySize |
( |
const std::shared_ptr< JSONStorage > & |
store | ) |
const |
◆ getDependencies()
std::vector< JSONStorage * > StorageCollection::getDependencies |
( |
const std::shared_ptr< JSONStorage > & |
store | ) |
const |
|
protected |
◆ getInstance()
◆ getJoinName()
◆ getOrAddStorage()
std::shared_ptr< JSONStorage > StorageCollection::getOrAddStorage |
( |
const std::string & |
name | ) |
|
◆ getOrStartJoin()
Retrieves a running or starts a new join-process. The join is identified by the joining IValueProvider
- Parameters
-
valProv | the identifying IValueProvider |
- Returns
- The JoinManager used for this join
◆ getStorage() [1/2]
std::shared_ptr< JSONStorage > StorageCollection::getStorage |
( |
const std::string & |
name | ) |
|
Retrieves a named JSONStorage by its name. If it does not exist, it returns a nullpointer
- Parameters
-
- Returns
- The JSONStorage if it exists, nullpointer else
◆ getStorage() [2/2]
std::shared_ptr< JSONStorage > StorageCollection::getStorage |
( |
unsigned long |
id | ) |
|
Retrieves a temporary JSONStorage by its ID. If it does not exist, a nullpointer returned
- Parameters
-
- Returns
- The JSONStorage
◆ getStorages()
std::vector< std::shared_ptr< JSONStorage > > StorageCollection::getStorages |
( |
| ) |
|
Returns a list of all named JSONStorage in the repository
- Returns
◆ getTemporaryIDStorages()
std::vector< std::pair< unsigned long, std::shared_ptr< JSONStorage > > > StorageCollection::getTemporaryIDStorages |
( |
| ) |
|
Returns a list of all temporary JSONStorage in the repository together with their result ID
- Returns
◆ getTemporaryStorages()
std::vector< std::shared_ptr< JSONStorage > > StorageCollection::getTemporaryStorages |
( |
| ) |
|
Returns a list of all temporary JSONStorage in the repository
- Returns
◆ operator=()
◆ orderContainerByDependencies()
void StorageCollection::orderContainerByDependencies |
( |
std::vector< std::pair< JSONStorage *, size_t >> & |
candidates | ) |
const |
|
protected |
◆ orderContainerByFIFO()
void StorageCollection::orderContainerByFIFO |
( |
std::vector< std::pair< JSONStorage *, size_t >> & |
candidates | ) |
const |
|
protected |
◆ orderContainerByLRU()
void StorageCollection::orderContainerByLRU |
( |
std::vector< std::pair< JSONStorage *, size_t >> & |
candidates | ) |
const |
|
protected |
◆ orderContainerByRandomExplorer()
void StorageCollection::orderContainerByRandomExplorer |
( |
std::vector< std::pair< JSONStorage *, size_t >> & |
candidates | ) |
const |
|
protected |
◆ orderContainerBySize()
void StorageCollection::orderContainerBySize |
( |
std::vector< std::pair< JSONStorage *, size_t >> & |
candidates | ) |
const |
|
protected |
◆ parsedHierarchySize()
size_t StorageCollection::parsedHierarchySize |
( |
const std::shared_ptr< JSONStorage > & |
store | ) |
const |
◆ removeStorage() [1/2]
void StorageCollection::removeStorage |
( |
const std::string & |
name | ) |
|
◆ removeStorage() [2/2]
void StorageCollection::removeStorage |
( |
unsigned long |
id | ) |
|
◆ stopJoin() [1/2]
Stops a join-process by it's identifying IValueProvider
- Parameters
-
valProv | the identifying IValueProvider |
◆ stopJoin() [2/2]
void StorageCollection::stopJoin |
( |
const JoinManager & |
jm | ) |
|
◆ storageExists()
bool StorageCollection::storageExists |
( |
const std::string & |
name | ) |
|
Checks if a given named JSONStorage exists.
- Parameters
-
- Returns
- True if it exists, false else
◆ CollectionTest
◆ CollectionTest_DEPENDENCIES_Test
friend class CollectionTest_DEPENDENCIES_Test |
|
friend |
◆ CollectionTest_FIFO_Test
friend class CollectionTest_FIFO_Test |
|
friend |
◆ CollectionTest_LARGEST_Test
friend class CollectionTest_LARGEST_Test |
|
friend |
◆ dependencies
◆ mut
std::mutex StorageCollection::mut |
|
protected |
◆ resultStorage
std::unordered_map<unsigned long, std::shared_ptr<JSONStorage> > StorageCollection::resultStorage |
|
protected |
◆ runningJoins
std::unordered_map<std::string, std::shared_ptr<JoinManager> > StorageCollection::runningJoins |
|
protected |
◆ storageInsertion
std::vector<std::string> StorageCollection::storageInsertion |
|
protected |
◆ storages
std::unordered_map<std::string, std::shared_ptr<JSONStorage> > StorageCollection::storages |
|
protected |
◆ tmpRes
The documentation for this class was generated from the following files:
- /home/nico/joda_tmp/tmp-joda-dirs/JODA-gh/libs/joda/core/modules/storage/collection/include/joda/storage/collection/StorageCollection.h
- /home/nico/joda_tmp/tmp-joda-dirs/JODA-gh/libs/joda/core/modules/storage/collection/src/StorageCollection.cpp