WIP on cache tools

This commit is contained in:
Joe Thornber
2013-09-11 11:40:46 +01:00
parent d3ce6b811b
commit 6615b25e4b
19 changed files with 560 additions and 54 deletions

33
caching/metadata.h Normal file
View File

@@ -0,0 +1,33 @@
#ifndef CACHE_METADATA_H
#define CACHE_METADATA_H
#include "persistent-data/block.h"
#include "persistent-data/data-structures/array.h"
#include "persistent-data/endian_utils.h"
#include "persistent-data/space-maps/disk.h"
#include "persistent-data/transaction_manager.h"
#include "caching/superblock.h"
//----------------------------------------------------------------
namespace caching {
class metadata {
public:
enum open_type {
CREATE,
OPEN
};
typedef block_manager<>::read_ref read_ref;
typedef block_manager<>::write_ref write_ref;
typedef boost::shared_ptr<metadata> ptr;
metadata(block_manager<>::ptr bm, open_type ot);
metadata(block_manager<>::ptr bm, block_address metadata_snap);
};
};
//----------------------------------------------------------------
#endif