blob: 756b393e094c01b07606a306e5c5dfeda3b630a0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "documentacceptedreply.h"
namespace documentapi {
/**
* This reply class is used by operations that perform writes to VDS/search,
* that is: Put, Remove, Update.
*/
class WriteDocumentReply : public DocumentAcceptedReply {
private:
uint64_t _highestModificationTimestamp;
public:
WriteDocumentReply(uint32_t type) :
DocumentAcceptedReply(type),
_highestModificationTimestamp(0)
{}
/**
* Returns a unique VDS timestamp so that visiting up to and including that
* timestamp will return a state including this operation but not any
* operations sent to the same distributor after it. For PUT/UPDATE/REMOVE
* operations this timestamp will be the timestamp of the operation.
*
* @return Returns the modification timestamp.
*/
uint64_t getHighestModificationTimestamp() const {
return _highestModificationTimestamp;
}
/**
* Sets the modification timestamp.
*
* @param timestamp
*/
void setHighestModificationTimestamp(uint64_t ts) {
_highestModificationTimestamp = ts;
}
};
}
|