summaryrefslogtreecommitdiffstats
path: root/common/genericresource.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-21 23:13:38 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-21 23:51:24 +0100
commit1d713d9e2dbaf27de9da087f9270d260dfc40c31 (patch)
tree666d8edd42e44df3eaa674a35b6e938b99c2f4b4 /common/genericresource.h
parent0adba61a00491b96dadaa6d4719cb46831356222 (diff)
downloadsink-1d713d9e2dbaf27de9da087f9270d260dfc40c31.tar.gz
sink-1d713d9e2dbaf27de9da087f9270d260dfc40c31.zip
Folded the SourceWriteback into the Synchronizer.
By concentrating all communication to the source in one place we get rid of several oddities. * Quite a bit of duplication since both need access to the synchronizationStore and the source. * We currently have an akward locking in place because both classes access the ync store. This is not easier to resolve cleanly. * The live of resource implementers becomes easier. * An implementation could elect to not use changereplay and always do a full sync... (maybe?)
Diffstat (limited to 'common/genericresource.h')
-rw-r--r--common/genericresource.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/common/genericresource.h b/common/genericresource.h
index 3736c8f..7e0f5ad 100644
--- a/common/genericresource.h
+++ b/common/genericresource.h
@@ -24,7 +24,7 @@
24#include <messagequeue.h> 24#include <messagequeue.h>
25#include <flatbuffers/flatbuffers.h> 25#include <flatbuffers/flatbuffers.h>
26#include <domainadaptor.h> 26#include <domainadaptor.h>
27#include "changereplay.h" 27#include <resourcecontext.h>
28 28
29#include <QTimer> 29#include <QTimer>
30 30
@@ -66,7 +66,6 @@ protected:
66 66
67 void setupPreprocessors(const QByteArray &type, const QVector<Sink::Preprocessor *> &preprocessors); 67 void setupPreprocessors(const QByteArray &type, const QVector<Sink::Preprocessor *> &preprocessors);
68 void setupSynchronizer(const QSharedPointer<Synchronizer> &synchronizer); 68 void setupSynchronizer(const QSharedPointer<Synchronizer> &synchronizer);
69 void setupChangereplay(const QSharedPointer<ChangeReplay> &changeReplay);
70 69
71 void onProcessorError(int errorCode, const QString &errorMessage); 70 void onProcessorError(int errorCode, const QString &errorMessage);
72 void enqueueCommand(MessageQueue &mq, int commandId, const QByteArray &data); 71 void enqueueCommand(MessageQueue &mq, int commandId, const QByteArray &data);
@@ -78,7 +77,6 @@ protected:
78 77
79private: 78private:
80 std::unique_ptr<CommandProcessor> mProcessor; 79 std::unique_ptr<CommandProcessor> mProcessor;
81 QSharedPointer<ChangeReplay> mChangeReplay;
82 QSharedPointer<Synchronizer> mSynchronizer; 80 QSharedPointer<Synchronizer> mSynchronizer;
83 int mError; 81 int mError;
84 QTimer mCommitQueueTimer; 82 QTimer mCommitQueueTimer;