2015-10-15 12:58:48 +02:00
|
|
|
#pragma once
|
2015-04-16 14:52:06 +02:00
|
|
|
#ifndef MESSMER_PARALLELACCESSSTORE_PARALLELACCESSBASESTORE_H_
|
|
|
|
#define MESSMER_PARALLELACCESSSTORE_PARALLELACCESSBASESTORE_H_
|
|
|
|
|
2016-02-11 14:22:18 +01:00
|
|
|
#include <cpp-utils/pointer/unique_ref.h>
|
2015-06-26 13:44:12 +02:00
|
|
|
#include <boost/optional.hpp>
|
2017-09-17 03:07:27 +02:00
|
|
|
#include <blockstore/utils/BlockId.h>
|
2015-04-16 14:52:06 +02:00
|
|
|
|
|
|
|
namespace parallelaccessstore {
|
|
|
|
|
|
|
|
template<class Resource, class Key>
|
|
|
|
class ParallelAccessBaseStore {
|
|
|
|
public:
|
|
|
|
virtual ~ParallelAccessBaseStore() {}
|
2015-06-26 13:44:12 +02:00
|
|
|
virtual boost::optional<cpputils::unique_ref<Resource>> loadFromBaseStore(const Key &key) = 0;
|
|
|
|
virtual void removeFromBaseStore(cpputils::unique_ref<Resource> block) = 0;
|
2017-09-17 03:07:27 +02:00
|
|
|
virtual void removeFromBaseStore(const blockstore::BlockId &blockId) = 0;
|
2015-04-16 14:52:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|