aboutsummaryrefslogtreecommitdiffstats
path: root/documentapi/src/vespa/documentapi/messagebus/messages/getbucketlistmessage.h
blob: baf2d2a286ec4648722702fd2fc1bdef99cc4eac (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
37
38
39
40
41
42
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include "documentmessage.h"
#include <vespa/document/bucket/bucketid.h>
#include <vespa/vespalib/stllike/string.h>

namespace documentapi {

class GetBucketListMessage : public DocumentMessage {
private:
    document::BucketId _bucketId;
    vespalib::string _bucketSpace;

protected:
    // Implements DocumentMessage.
    DocumentReply::UP doCreateReply() const override;

public:
    /**
     * Constructs a new message with initial content.
     *
     * @param bucketId The bucket whose list to retrieve.
     */
    GetBucketListMessage(const document::BucketId &bucketId);

    ~GetBucketListMessage();

    /**
     * Returns the bucket whose list to retrieve.
     *
     * @return The bucket.
     */
    const document::BucketId &getBucketId() const { return _bucketId; }

    const vespalib::string &getBucketSpace() const { return _bucketSpace; }
    void setBucketSpace(const vespalib::string &value) { _bucketSpace = value; }
    uint32_t getType() const override;
    string toString() const override { return "getbucketlistmessage"; }
};

}