blob: 9a6030f449c5835cf2b9bf88886362cf0871a594 (
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 Yahoo. 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
|