aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/bucketdb/storagebucketinfo.h
blob: 082afff1e8219cbb859a059b15289709eb3660ce (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/storageapi/buckets/bucketinfo.h>

namespace storage::bucketdb {

struct StorageBucketInfo {
    api::BucketInfo info;

    StorageBucketInfo() noexcept : info() {}
    void print(std::ostream&, bool verbose, const std::string& indent) const;
    bool valid() const noexcept { return info.valid(); }
    void setBucketInfo(const api::BucketInfo& i) noexcept { info = i; }
    const api::BucketInfo& getBucketInfo() const noexcept { return info; }
    bool verifyLegal() const noexcept { return true; }
    uint32_t getMetaCount() const noexcept { return info.getMetaCount(); }
};

std::ostream& operator<<(std::ostream& out, const StorageBucketInfo& info);

}