diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-08 21:34:06 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-08 21:34:06 +0100 |
commit | 44744e281a56488c7ef257e12ca379ec4ceb2cdd (patch) | |
tree | 5fd45d6c6cf5e68ba2323fac3f498c6afa6f2ddf /common/storage.h | |
parent | d82f0f6e52b601c3067ca70183458f5ce9b22c22 (diff) | |
download | sink-44744e281a56488c7ef257e12ca379ec4ceb2cdd.tar.gz sink-44744e281a56488c7ef257e12ca379ec4ceb2cdd.zip |
Executed database removal in the resource instead of the client.
The resource doesn't really notify all clients properly about the
removal, but the tests all still pass.
Diffstat (limited to 'common/storage.h')
-rw-r--r-- | common/storage.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/storage.h b/common/storage.h index 84175b3..8ec3f1d 100644 --- a/common/storage.h +++ b/common/storage.h | |||
@@ -180,6 +180,13 @@ public: | |||
180 | qint64 diskUsage() const; | 180 | qint64 diskUsage() const; |
181 | void removeFromDisk() const; | 181 | void removeFromDisk() const; |
182 | 182 | ||
183 | /** | ||
184 | * Clears all cached environments. | ||
185 | * | ||
186 | * This only ever has to be called if a database was removed from another process. | ||
187 | */ | ||
188 | static void clearEnv(); | ||
189 | |||
183 | static qint64 maxRevision(const Sink::Storage::Transaction &); | 190 | static qint64 maxRevision(const Sink::Storage::Transaction &); |
184 | static void setMaxRevision(Sink::Storage::Transaction &, qint64 revision); | 191 | static void setMaxRevision(Sink::Storage::Transaction &, qint64 revision); |
185 | 192 | ||