aboutsummaryrefslogtreecommitdiffstats
path: root/documentapi/src/vespa/documentapi/messagebus/messages/emptybucketsmessage.cpp
blob: 755e523c0659be4bce0b00e7c0045dbeccaaf975 (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
43
44
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "emptybucketsmessage.h"

namespace documentapi {

EmptyBucketsMessage::EmptyBucketsMessage() :
    _bucketIds()
{
}

EmptyBucketsMessage::EmptyBucketsMessage(const std::vector<document::BucketId> &bucketIds) :
    _bucketIds(bucketIds)
{
}

EmptyBucketsMessage::~EmptyBucketsMessage() {
}

void
EmptyBucketsMessage::setBucketIds(const std::vector<document::BucketId> &bucketIds)
{
    _bucketIds = bucketIds;
}

void
EmptyBucketsMessage::resize(uint32_t size)
{
    _bucketIds.resize(size);
}

DocumentReply::UP
EmptyBucketsMessage::doCreateReply() const
{
    return DocumentReply::UP(new VisitorReply(DocumentProtocol::REPLY_EMPTYBUCKETS));
}

uint32_t
EmptyBucketsMessage::getType() const
{
    return DocumentProtocol::MESSAGE_EMPTYBUCKETS;
}

}