diff options
Diffstat (limited to 'source/core')
-rw-r--r-- | source/core/StarBTreeDatabase.cpp | 5 | ||||
-rw-r--r-- | source/core/StarBTreeDatabase.hpp | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/source/core/StarBTreeDatabase.cpp b/source/core/StarBTreeDatabase.cpp index b188f20..19b0bd2 100644 --- a/source/core/StarBTreeDatabase.cpp +++ b/source/core/StarBTreeDatabase.cpp @@ -196,6 +196,11 @@ void BTreeDatabase::forAll(function<void(ByteArray, ByteArray)> v) { m_impl.forAll(std::move(v)); } +void BTreeDatabase::recoverAll(function<void(ByteArray, ByteArray)> v, function<void(String const&, std::exception const&)> e) { + ReadLocker readLocker(m_lock); + m_impl.recoverAll(std::move(v), std::move(e)); +} + bool BTreeDatabase::insert(ByteArray const& k, ByteArray const& data) { WriteLocker writeLocker(m_lock); checkKeySize(k); diff --git a/source/core/StarBTreeDatabase.hpp b/source/core/StarBTreeDatabase.hpp index 8f7a4fd..f1b88a1 100644 --- a/source/core/StarBTreeDatabase.hpp +++ b/source/core/StarBTreeDatabase.hpp @@ -64,6 +64,7 @@ public: void forEach(ByteArray const& lower, ByteArray const& upper, function<void(ByteArray, ByteArray)> v); void forAll(function<void(ByteArray, ByteArray)> v); + void recoverAll(function<void(ByteArray, ByteArray)> v, function<void(String const&, std::exception const&)> e); // Returns true if a value was overwritten bool insert(ByteArray const& k, ByteArray const& data); |