aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/attribute/initialized_attributes_result.h
blob: 84b57e780fd2f9a82c1c46b9f5d410bf7cc823be (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.

#pragma once

#include "attribute_initializer_result.h"
#include <mutex>
#include <vector>

namespace proton {

/**
 * Class used to track a set of initialized attribute vectors.
 */
class InitializedAttributesResult
{
private:
    std::vector<AttributeInitializerResult> _attributes;
    std::mutex _lock;

public:
    InitializedAttributesResult();
    void add(AttributeInitializerResult attribute);
    const std::vector<AttributeInitializerResult> &get() const { return _attributes; }
};

} // namespace proton