blob: fba337cb841b355979d0c08ca8f019fffdf00d02 (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/document/bucket/bucketid.h>
#include <vespa/storage/bucketdb/bucketcopy.h>
namespace storage::distributor::dbtransition {
struct Entry {
Entry(const document::BucketId& bid,
const BucketCopy& copy_) noexcept
: bucket_key(bid.toKey()),
copy(copy_)
{}
uint64_t bucket_key;
BucketCopy copy;
document::BucketId bucket_id() const noexcept {
return document::BucketId(document::BucketId::keyToBucketId(bucket_key));
}
bool operator<(const Entry& other) const noexcept {
return bucket_key < other.bucket_key;
}
};
}
|