Class InferenceToXContentCompressor
java.lang.Object
org.elasticsearch.client.ml.inference.InferenceToXContentCompressor
Collection of helper methods. Similar to CompressedXContent, but this utilizes GZIP.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends org.elasticsearch.common.xcontent.ToXContentObject>
Stringdeflate(T objectToCompress)
static <T> T
inflate(String compressedString, org.elasticsearch.core.CheckedFunction<org.elasticsearch.common.xcontent.XContentParser,T,IOException> parserFunction, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry)
-
Method Details
-
deflate
public static <T extends org.elasticsearch.common.xcontent.ToXContentObject> String deflate(T objectToCompress) throws IOException- Throws:
IOException
-
inflate
public static <T> T inflate(String compressedString, org.elasticsearch.core.CheckedFunction<org.elasticsearch.common.xcontent.XContentParser,T,IOException> parserFunction, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry) throws IOException- Throws:
IOException
-