summaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/server/operationdonecontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore/src/vespa/searchcore/proton/server/operationdonecontext.cpp')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/operationdonecontext.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/operationdonecontext.cpp b/searchcore/src/vespa/searchcore/proton/server/operationdonecontext.cpp
index 53b12972c44..9b1c6de15df 100644
--- a/searchcore/src/vespa/searchcore/proton/server/operationdonecontext.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/operationdonecontext.cpp
@@ -1,14 +1,23 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "operationdonecontext.h"
+#include <vespa/searchcore/proton/common/feedtoken.h>
namespace proton {
-OperationDoneContext::OperationDoneContext(IDestructorCallback::SP token)
- : _token(std::move(token))
+OperationDoneContext::OperationDoneContext(std::shared_ptr<feedtoken::IState> token, std::shared_ptr<vespalib::IDestructorCallback> done_callback)
+ : _token(std::move(token)),
+ _done_callback(std::move(done_callback))
{
}
OperationDoneContext::~OperationDoneContext() = default;
+bool
+OperationDoneContext::is_replay() const
+{
+ return (!_token || _token->is_replay());
+}
+
+
} // namespace proton