libcryfs/src/parallelaccessstore/ParallelAccessBaseStore.h

23 lines
665 B
C
Raw Normal View History

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>
#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;
virtual void removeFromBaseStore(const blockstore::BlockId &blockId) = 0;
2015-04-16 14:52:06 +02:00
};
}
#endif