aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/bucketdb/remove_batch_entry.h
blob: 953d271c043cdafe09dd8fabfdc3f36f9c284333 (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
32
33
34
35
36
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/document/base/globalid.h>
#include <vespa/document/bucket/bucketid.h>
#include <vespa/persistence/spi/types.h>


namespace proton::bucketdb {

/*
 * Class containing meta data for a single document being removed from
 * bucket db.
 */
class RemoveBatchEntry {
    document::GlobalId      _gid;
    document::BucketId      _bucket_id;
    storage::spi::Timestamp _timestamp;
    uint32_t                _doc_size;
public:
    RemoveBatchEntry(const document::GlobalId& gid, const document::BucketId& bucket_id, const storage::spi::Timestamp& timestamp, uint32_t doc_size) noexcept
        : _gid(gid),
          _bucket_id(bucket_id),
          _timestamp(timestamp),
          _doc_size(doc_size)
    {
    }

    const document::GlobalId& get_gid() const noexcept { return _gid; }
    const document::BucketId& get_bucket_id() const noexcept { return _bucket_id; }
    const storage::spi::Timestamp& get_timestamp() const noexcept { return _timestamp; }
    uint32_t get_doc_size() const noexcept { return _doc_size; }
};

}