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

#include "getbucketstatemessage.h"
#include "getbucketstatereply.h"
#include <vespa/documentapi/messagebus/documentprotocol.h>

namespace documentapi {

GetBucketStateMessage::GetBucketStateMessage() :
    DocumentMessage(),
    _bucket()
{ }

GetBucketStateMessage::GetBucketStateMessage(const document::BucketId &bucket) :
    DocumentMessage(),
    _bucket(bucket)
{ }

DocumentReply::UP
GetBucketStateMessage::doCreateReply() const
{
    return DocumentReply::UP(new GetBucketStateReply());
}

bool
GetBucketStateMessage::hasSequenceId() const
{
    return true;
}

uint64_t
GetBucketStateMessage::getSequenceId() const
{
    return _bucket.getRawId();
}

uint32_t
GetBucketStateMessage::getType() const
{
    return DocumentProtocol::MESSAGE_GETBUCKETSTATE;
}

}