summaryrefslogtreecommitdiffstats
path: root/common/flush.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-25 08:27:06 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-25 09:23:55 +0100
commit22af1ed535b4afc8db3804e72bc5adb1a1b28d60 (patch)
tree07665f41d5b40d658e95a64bb76020f1fd9d088e /common/flush.h
parent64d7d7bdd1edb2bcc305ca007784d0708cf7ef3c (diff)
downloadsink-22af1ed535b4afc8db3804e72bc5adb1a1b28d60.tar.gz
sink-22af1ed535b4afc8db3804e72bc5adb1a1b28d60.zip
Added the flush command.
Instead of trying to actually flush queues, we send a special command through the same queues as the other commands and can thus guarantee that the respective commands have been processed without blocking anything.
Diffstat (limited to 'common/flush.h')
-rw-r--r--common/flush.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/common/flush.h b/common/flush.h
new file mode 100644
index 0000000..3f04608
--- /dev/null
+++ b/common/flush.h
@@ -0,0 +1,45 @@
1/*
2 * Copyright (c) 2016 Christian Mollekopf <mollekopf@kolabsys.com>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) version 3, or any
8 * later version accepted by the membership of KDE e.V. (or its
9 * successor approved by the membership of KDE e.V.), which shall
10 * act as a proxy defined in Section 6 of version 3 of the license.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20#pragma once
21
22#include "sink_export.h"
23
24namespace Sink {
25namespace Flush {
26
27enum FlushType {
28 /**
29 * Guarantees that any commands issued before this flush are written back to the server once this flush completes.
30 * Note that this does not guarantee the success of writeback, only that an attempt has been made.
31 */
32 FlushReplayQueue,
33 /**
34 * Guarantees that any synchronization request issued before this flush has been executed and that all entities created by it have been processed once this flush completes.
35 */
36 FlushSynchronization,
37 /**
38 * Guarantees that any modification issued before this flush has been processed once this flush completes.
39 */
40 FlushUserQueue
41};
42
43}
44}
45