use of com.yahoo.vespa.config.protocol.SlimeConfigResponse in project vespa by vespa-engine.
the class LZ4ConfigResponseFactory method createResponse.
@Override
public ConfigResponse createResponse(ConfigPayload payload, InnerCNode defFile, long generation) {
Utf8Array rawPayload = payload.toUtf8Array(true);
String configMd5 = ConfigUtils.getMd5(rawPayload);
CompressionInfo info = CompressionInfo.create(CompressionType.LZ4, rawPayload.getByteLength());
Utf8Array compressed = new Utf8Array(compressor.compress(rawPayload.getBytes()));
return new SlimeConfigResponse(compressed, defFile, generation, configMd5, info);
}
use of com.yahoo.vespa.config.protocol.SlimeConfigResponse in project vespa by vespa-engine.
the class UncompressedConfigResponseFactory method createResponse.
@Override
public ConfigResponse createResponse(ConfigPayload payload, InnerCNode defFile, long generation) {
Utf8Array rawPayload = payload.toUtf8Array(true);
String configMd5 = ConfigUtils.getMd5(rawPayload);
CompressionInfo info = CompressionInfo.create(CompressionType.UNCOMPRESSED, rawPayload.getByteLength());
return new SlimeConfigResponse(rawPayload, defFile, generation, configMd5, info);
}
Aggregations