blob: 3de241e70fb29f8f235a119b18c664d6ecab7690 (
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 "bucket_db_owner.h"
namespace proton::bucketdb {
class IBucketCreateNotifier;
/**
* Base class for split/join handling utility classes that bundles temporary
* variables used during the operation.
*/
class BucketSessionBase
{
public:
using GlobalId = document::GlobalId;
using BucketId = document::BucketId;
using Timestamp = storage::spi::Timestamp;
protected:
Guard _bucketDB;
IBucketCreateNotifier &_bucketCreateNotifier;
public:
BucketSessionBase(BucketDBOwner &bucketDB, IBucketCreateNotifier &bucketCreateNotifier);
BucketSessionBase(const BucketSessionBase &) = delete;
BucketSessionBase & operator =(const BucketSessionBase &) = delete;
~BucketSessionBase();
bool extractInfo(const BucketId &bucket, BucketState *&info);
static bool calcFixupNeed(BucketState *state, bool wantActive, bool fixup);
};
}
|