blob: 17911d9cbbb07fd66b652d61158c4291e8c80d2e (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "newconfigoperation.h"
#include <vespa/vespalib/util/stringfmt.h>
using document::DocumentTypeRepo;
using vespalib::make_string;
namespace proton {
NewConfigOperation::NewConfigOperation(SerialNum serialNum,
IStreamHandler &streamHandler)
: FeedOperation(FeedOperation::NEW_CONFIG),
_streamHandler(streamHandler)
{
setSerialNum(serialNum);
}
void
NewConfigOperation::serialize(vespalib::nbostream &os) const
{
_streamHandler.serializeConfig(getSerialNum(), os);
}
void
NewConfigOperation::deserialize(vespalib::nbostream &is,
const DocumentTypeRepo &)
{
_streamHandler.deserializeConfig(getSerialNum(), is);
}
vespalib::string NewConfigOperation::toString() const {
return make_string("NewConfig(serialNum=%" PRIu64 ")", getSerialNum());
}
} // namespace proton
|