2014-12-09 17:45:33 +01:00
|
|
|
#pragma once
|
2015-10-15 13:10:20 +02:00
|
|
|
#ifndef MESSMER_BLOBSTORE_INTERFACE_BLOBSTORE_H_
|
|
|
|
#define MESSMER_BLOBSTORE_INTERFACE_BLOBSTORE_H_
|
2014-12-09 17:45:33 +01:00
|
|
|
|
|
|
|
#include "Blob.h"
|
|
|
|
#include <string>
|
|
|
|
#include <memory>
|
|
|
|
|
2015-02-17 00:40:34 +01:00
|
|
|
#include "messmer/blockstore/utils/Key.h"
|
2015-06-21 17:43:45 +02:00
|
|
|
#include <messmer/cpp-utils/pointer/unique_ref.h>
|
2014-12-09 17:45:33 +01:00
|
|
|
|
|
|
|
namespace blobstore {
|
|
|
|
|
|
|
|
class BlobStore {
|
|
|
|
public:
|
|
|
|
virtual ~BlobStore() {}
|
|
|
|
|
2015-06-18 12:45:37 +02:00
|
|
|
virtual cpputils::unique_ref<Blob> create() = 0;
|
|
|
|
virtual boost::optional<cpputils::unique_ref<Blob>> load(const blockstore::Key &key) = 0;
|
|
|
|
virtual void remove(cpputils::unique_ref<Blob> blob) = 0;
|
2014-12-09 17:45:33 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|