diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-03 11:17:08 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-03 11:23:25 +0100 |
commit | 0f75ad4b96ec5994c022109278cad28a43255793 (patch) | |
tree | 6d7c6153025a79557dd1218d9be0a4a7cb7945c5 /common/clientapi.h | |
parent | 2c80424031c195333cfa6785ea7ab57dc9613fa3 (diff) | |
download | sink-0f75ad4b96ec5994c022109278cad28a43255793.tar.gz sink-0f75ad4b96ec5994c022109278cad28a43255793.zip |
Improved resource access caching
* Smarter caching. ResourceAccess instances close after a timeout, if not reused.
* Introduced a start command to avoid race condition when sending
commands to a resource that is currently shutting down.
* We resend pending commands after we lost access to the resource
* unexpectedly.
Diffstat (limited to 'common/clientapi.h')
-rw-r--r-- | common/clientapi.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/clientapi.h b/common/clientapi.h index 8f87562..edf42e4 100644 --- a/common/clientapi.h +++ b/common/clientapi.h | |||
@@ -80,6 +80,15 @@ public: | |||
80 | static KAsync::Job<void> shutdown(const QByteArray &resourceIdentifier); | 80 | static KAsync::Job<void> shutdown(const QByteArray &resourceIdentifier); |
81 | 81 | ||
82 | /** | 82 | /** |
83 | * Start resource. | ||
84 | * | ||
85 | * The resource is ready for operation once this command completes. | ||
86 | * This command is only necessary if a resource was shutdown previously, | ||
87 | * otherwise the resource process will automatically start as necessary. | ||
88 | */ | ||
89 | static KAsync::Job<void> start(const QByteArray &resourceIdentifier); | ||
90 | |||
91 | /** | ||
83 | * Synchronize data to local cache. | 92 | * Synchronize data to local cache. |
84 | */ | 93 | */ |
85 | static KAsync::Job<void> synchronize(const Akonadi2::Query &query); | 94 | static KAsync::Job<void> synchronize(const Akonadi2::Query &query); |