aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/flushengine/flushtargetproxy.cpp
blob: b62a9191625472d1c1bb7377e4b019ab23e24e7a (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "flushtargetproxy.h"

namespace proton {

using searchcorespi::IFlushTarget;
using searchcorespi::FlushStats;

FlushTargetProxy::FlushTargetProxy(const IFlushTarget::SP &target)
    : IFlushTarget(target->getName(), target->getType(),
                   target->getComponent()),
      _target(target)
{
}

FlushTargetProxy::FlushTargetProxy(const IFlushTarget::SP &target,
                                   const vespalib::string & prefix)
    : IFlushTarget(prefix + "." + target->getName(), target->getType(),
                   target->getComponent()),
      _target(target)
{
}

IFlushTarget::Task::UP
FlushTargetProxy::initFlush(SerialNum currentSerial, std::shared_ptr<search::IFlushToken> flush_token)
{
    return _target->initFlush(currentSerial, std::move(flush_token));
}

} // namespace proton