aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/vespa/vespalib/datastore/unique_store_add_result.h
blob: 8784fd86dd3ee4a7dfa0e34ebdbf3a1e5dad745d (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 "entryref.h"


namespace vespalib::datastore {

/*
 * Representation of result of adding a value to unique store.
 */
class UniqueStoreAddResult {
    EntryRef _ref;
    bool _inserted;
public:
    UniqueStoreAddResult(EntryRef ref_, bool inserted_)
        : _ref(ref_),
          _inserted(inserted_)
    {
    }
    EntryRef ref() const { return _ref; }
    bool inserted() { return _inserted; }
};

}