summaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/server/operationdonecontext.cpp
blob: 9b1c6de15df2f536ba47a89f82d36a0ff50556e2 (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
// 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(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