From 0f75ad4b96ec5994c022109278cad28a43255793 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 3 Dec 2015 11:17:08 +0100 Subject: 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. --- common/clientapi.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'common/clientapi.h') diff --git a/common/clientapi.h b/common/clientapi.h index 8f87562..edf42e4 100644 --- a/common/clientapi.h +++ b/common/clientapi.h @@ -79,6 +79,15 @@ public: */ static KAsync::Job shutdown(const QByteArray &resourceIdentifier); + /** + * Start resource. + * + * The resource is ready for operation once this command completes. + * This command is only necessary if a resource was shutdown previously, + * otherwise the resource process will automatically start as necessary. + */ + static KAsync::Job start(const QByteArray &resourceIdentifier); + /** * Synchronize data to local cache. */ -- cgit v1.2.3