Code formatting & TODOs
This commit is contained in:
parent
ef7097a299
commit
03597b9474
@ -13,7 +13,6 @@ namespace caching {
|
||||
class PeriodicTask;
|
||||
|
||||
//TODO Test
|
||||
//TODO Also throw blocks out after a timeout
|
||||
|
||||
class Cache {
|
||||
public:
|
||||
|
@ -52,7 +52,6 @@ void CachingBlockStore::remove(std::unique_ptr<Block> block) {
|
||||
}
|
||||
|
||||
uint64_t CachingBlockStore::numBlocks() const {
|
||||
//TODO Add number of NewBlock instances
|
||||
return _baseBlockStore->numBlocks() + _numNewBlocks;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,6 @@
|
||||
namespace blockstore {
|
||||
namespace caching {
|
||||
|
||||
//TODO Rename this to CachingBlockStore and the other one to something else
|
||||
//TODO Check that this blockstore allows parallel destructing of blocks (otherwise we won't encrypt blocks in parallel)
|
||||
class CachingBlockStore: public BlockStore {
|
||||
public:
|
||||
|
@ -23,12 +23,12 @@ public:
|
||||
virtual uint64_t numBlocks() const = 0;
|
||||
|
||||
std::unique_ptr<Block> create(const Data &data) {
|
||||
std::unique_ptr<Block> block(nullptr);
|
||||
while(block.get() == nullptr) {
|
||||
//TODO Copy necessary?
|
||||
block = tryCreate(createKey(), data.copy());
|
||||
}
|
||||
return block;
|
||||
std::unique_ptr<Block> block(nullptr);
|
||||
while(block.get() == nullptr) {
|
||||
//TODO Copy necessary?
|
||||
block = tryCreate(createKey(), data.copy());
|
||||
}
|
||||
return block;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user