blob: 124ee1bdf4568518f14ead34b6c18f6d5f0d5c23 (
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 2017 Yahoo Holdings. 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_)
: 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;
}
};
}
|