417a701636
- Fixed numBlocks() in OnDiskBlockStore, FakeBlockStore, CachingBlockStore, ... - CachingBlockStore caches created blocks and doesn't directly create them in the underlying blockstore
23 lines
535 B
C++
23 lines
535 B
C++
#pragma once
|
|
#ifndef FSPP_BLOCKSTORE_BLOCKSTOREWITHRANDOMKEYS_H_
|
|
#define FSPP_BLOCKSTORE_BLOCKSTOREWITHRANDOMKEYS_H_
|
|
|
|
#include "../BlockStore.h"
|
|
#include "../Block.h"
|
|
|
|
namespace blockstore {
|
|
|
|
// This is an implementation helpers for BlockStores that use random block keys.
|
|
// You should never give this static type to the client. The client should always
|
|
// work with the BlockStore interface instead.
|
|
class BlockStoreWithRandomKeys: public BlockStore {
|
|
public:
|
|
Key createKey() final {
|
|
return Key::CreateRandom();
|
|
}
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|