aboutsummaryrefslogtreecommitdiffstats
path: root/documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp
blob: 5823cc6720eae3fe166f11344ad481688bd92212 (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
45
46
47
48
49
50
51
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "routablefactories60.h"

namespace documentapi {

// TODO dedupe

bool RoutableFactories60::CreateVisitorMessageFactory::encodeBucketSpace(
        vespalib::stringref bucketSpace,
        vespalib::GrowableByteBuffer& buf) const {
    doEncodeBucketSpace(bucketSpace, buf);
    return true;
}

string RoutableFactories60::CreateVisitorMessageFactory::decodeBucketSpace(document::ByteBuffer& buf) const {
    return doDecodeBucketSpace(buf);
}

bool RoutableFactories60::StatBucketMessageFactory::encodeBucketSpace(
        vespalib::stringref bucketSpace,
        vespalib::GrowableByteBuffer& buf) const {
    doEncodeBucketSpace(bucketSpace, buf);
    return true;
}

string RoutableFactories60::StatBucketMessageFactory::decodeBucketSpace(document::ByteBuffer& buf) const {
    return doDecodeBucketSpace(buf);
}

bool RoutableFactories60::GetBucketListMessageFactory::encodeBucketSpace(
        vespalib::stringref bucketSpace,
        vespalib::GrowableByteBuffer& buf) const {
    doEncodeBucketSpace(bucketSpace, buf);
    return true;
}

string RoutableFactories60::GetBucketListMessageFactory::decodeBucketSpace(document::ByteBuffer& buf) const {
    return doDecodeBucketSpace(buf);
}

void RoutableFactories60::doEncodeBucketSpace(
        vespalib::stringref bucketSpace,
        vespalib::GrowableByteBuffer& buf) {
    buf.putString(bucketSpace);
}
string RoutableFactories60::doDecodeBucketSpace(document::ByteBuffer& buf) {
    return decodeString(buf);
}

}