aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/rpc/EnvelopedClusterStateBundleCodec.java
blob: 3cb0b0dd766c0b37f299727b9dfd47601e00c15c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.clustercontroller.core.rpc;

import com.yahoo.vespa.clustercontroller.core.ClusterStateBundle;

/**
 * Cluster state bundle codec which opaquely encodes/decodes both the bundle
 * as well as the metadata required to correctly perform compression/decompression.
 *
 * Useful for embedding an opaque bundle blob somewhere without needing to care aboout
 * any of the associated metadata.
 */
public interface EnvelopedClusterStateBundleCodec {

    byte[] encodeWithEnvelope(ClusterStateBundle stateBundle);

    ClusterStateBundle decodeWithEnvelope(byte[] encodedClusterStateBundle);

}