aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/server/updatedonecontext.cpp
blob: 8255916c02e5c1d6ae2a838c151abbc161ce87da (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "updatedonecontext.h"
#include <vespa/document/fieldvalue/document.h>

using document::Document;

namespace proton {

UpdateDoneContext::UpdateDoneContext(std::shared_ptr<feedtoken::IState> token, IPendingLidTracker::Token uncommitted, const document::DocumentUpdate::SP &upd)
    : OperationDoneContext(std::move(token), {}),
      _uncommitted(std::move(uncommitted)),
      _upd(upd),
      _doc()
{
}

UpdateDoneContext::~UpdateDoneContext() = default;

void
UpdateDoneContext::setDocument(std::shared_future<std::unique_ptr<const Document>> doc)
{
    _doc = std::move(doc);
}

}  // namespace proton