aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/bucketdb/ibucketdbhandler.h
blob: 6aeb91cb88b64b7c51709b42a7d6868860b3ebce (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
// 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/searchlib/common/serialnum.h>

namespace proton { struct IDocumentMetaStore; }

namespace proton::bucketdb {

/**
 * The IBucketDBHandler class handles operations on a bucket db.
 */
class IBucketDBHandler
{
public:
    using BucketId = document::BucketId;

    IBucketDBHandler() { }

    virtual ~IBucketDBHandler() { }

    virtual void handleSplit(search::SerialNum serialNum, const BucketId &source,
                             const BucketId &target1, const BucketId &target2) = 0;

    virtual void handleJoin(search::SerialNum serialNum, const BucketId &source1,
                            const BucketId &source2, const BucketId &target) = 0;

    virtual void handleCreateBucket(const BucketId &bucketId) = 0;
    virtual void handleDeleteBucket(const BucketId &bucketId) = 0;
};

}