blob: 035197d2bd9884da3a421e3c7d50ac07ed7baa8c (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "cluster_state_bundle_codec.h"
#include <memory>
namespace storage::rpc {
/**
* Implementation of ClusterStateBundleCodec which uses structured Slime binary encoding
* to implement (de-)serialization of ClusterStateBundle instances. Encoding format is
* intentionally extensible so that we may add other information to it later.
*
* LZ4 compression is transparently applied during encoding and decompression is
* subsequently applied during decoding.
*/
class SlimeClusterStateBundleCodec : public ClusterStateBundleCodec {
public:
EncodedClusterStateBundle encode(const lib::ClusterStateBundle&) const override;
std::shared_ptr<const lib::ClusterStateBundle> decode(const EncodedClusterStateBundle&) const override;
};
}
|