From e9a85aa4e4d0634548b5c97461beb27ae5559338 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 26 Feb 2014 08:39:44 +0100 Subject: db/simple: mount points A SimpleDatabase instance can now "mount" other Database instances at certain locations. This is used to use a new SimpleDatabase instance for each storage mount (issued with the "mount" protocol command). Each such instance has its own database file, stored in the directory that is specified with the "cache_directory" option. --- src/db/update/Service.hxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/db/update/Service.hxx') diff --git a/src/db/update/Service.hxx b/src/db/update/Service.hxx index e42a0fa5a..cbb4a3f9d 100644 --- a/src/db/update/Service.hxx +++ b/src/db/update/Service.hxx @@ -28,7 +28,7 @@ class SimpleDatabase; class DatabaseListener; class UpdateWalk; -class Storage; +class CompositeStorage; /** * This class manages the update queue and runs the update thread. @@ -41,7 +41,7 @@ class UpdateService final : DeferredMonitor { }; SimpleDatabase &db; - Storage &storage; + CompositeStorage &storage; DatabaseListener &listener; @@ -63,7 +63,7 @@ class UpdateService final : DeferredMonitor { public: UpdateService(EventLoop &_loop, SimpleDatabase &_db, - Storage &_storage, + CompositeStorage &_storage, DatabaseListener &_listener); ~UpdateService(); @@ -92,6 +92,13 @@ public: */ void CancelAllAsync(); + /** + * Cancel all updates for the given mount point. If an update + * is already running for it, the method will wait for + * cancellation to complete. + */ + void CancelMount(const char *uri); + private: /* virtual methods from class DeferredMonitor */ virtual void RunDeferred() override; -- cgit v1.2.3