diff options
Diffstat (limited to '')
-rw-r--r-- | src/cache.h | 6 | ||||
-rw-r--r-- | src/cachestoremyriad.h | 1 | ||||
-rw-r--r-- | src/myriad.cpp | 5 | ||||
-rw-r--r-- | src/myriad.h | 2 |
4 files changed, 11 insertions, 3 deletions
diff --git a/src/cache.h b/src/cache.h index a2774ce..455cf1b 100644 --- a/src/cache.h +++ b/src/cache.h | |||
@@ -16,8 +16,6 @@ | |||
16 | 16 | ||
17 | #include "bu/trace.h" | 17 | #include "bu/trace.h" |
18 | 18 | ||
19 | #include "bu/sio.h" | ||
20 | |||
21 | namespace Bu | 19 | namespace Bu |
22 | { | 20 | { |
23 | // template<class keytype, class obtype> | 21 | // template<class keytype, class obtype> |
@@ -242,6 +240,8 @@ namespace Bu | |||
242 | 240 | ||
243 | pCalc->onLoad( pData, k ); | 241 | pCalc->onLoad( pData, k ); |
244 | 242 | ||
243 | pStore->sync(); | ||
244 | |||
245 | return Ptr( this, pData, k ); | 245 | return Ptr( this, pData, k ); |
246 | } | 246 | } |
247 | 247 | ||
@@ -331,6 +331,7 @@ namespace Bu | |||
331 | hEnt.erase( cId ); | 331 | hEnt.erase( cId ); |
332 | 332 | ||
333 | pStore->destroy( pObj, cId ); | 333 | pStore->destroy( pObj, cId ); |
334 | pStore->sync(); | ||
334 | } | 335 | } |
335 | catch( Bu::HashException &e ) { | 336 | catch( Bu::HashException &e ) { |
336 | pCalc->onDestroy( cId ); | 337 | pCalc->onDestroy( cId ); |
@@ -343,6 +344,7 @@ namespace Bu | |||
343 | else | 344 | else |
344 | { | 345 | { |
345 | pStore->destroy( cId ); | 346 | pStore->destroy( cId ); |
347 | pStore->sync(); | ||
346 | } | 348 | } |
347 | } | 349 | } |
348 | } | 350 | } |
diff --git a/src/cachestoremyriad.h b/src/cachestoremyriad.h index e36506e..e632a82 100644 --- a/src/cachestoremyriad.h +++ b/src/cachestoremyriad.h | |||
@@ -98,7 +98,6 @@ namespace Bu | |||
98 | MyriadStream ns = mStore.openStream( iStream ); | 98 | MyriadStream ns = mStore.openStream( iStream ); |
99 | __cacheStoreMyriadStore<keytype, obtype>( ns, *pSrc, key ); | 99 | __cacheStoreMyriadStore<keytype, obtype>( ns, *pSrc, key ); |
100 | ns.setSize( ns.tell() ); | 100 | ns.setSize( ns.tell() ); |
101 | sync(); | ||
102 | return key; | 101 | return key; |
103 | } | 102 | } |
104 | 103 | ||
diff --git a/src/myriad.cpp b/src/myriad.cpp index 0e8dc80..b582df3 100644 --- a/src/myriad.cpp +++ b/src/myriad.cpp | |||
@@ -656,3 +656,8 @@ bool Bu::Myriad::isMyriad( Bu::Stream &sStore ) | |||
656 | return true; | 656 | return true; |
657 | } | 657 | } |
658 | 658 | ||
659 | const Bu::BitString &Bu::Myriad::getBlocksUsed() const | ||
660 | { | ||
661 | return bsBlockUsed; | ||
662 | } | ||
663 | |||
diff --git a/src/myriad.h b/src/myriad.h index 86c7aa1..3382ab5 100644 --- a/src/myriad.h +++ b/src/myriad.h | |||
@@ -155,6 +155,8 @@ namespace Bu | |||
155 | */ | 155 | */ |
156 | static bool isMyriad( Bu::Stream &sStore ); | 156 | static bool isMyriad( Bu::Stream &sStore ); |
157 | 157 | ||
158 | const Bu::BitString &getBlocksUsed() const; | ||
159 | |||
158 | private: | 160 | private: |
159 | /** | 161 | /** |
160 | * Initialize this object based on the data already in the assosiated | 162 | * Initialize this object based on the data already in the assosiated |