Class InferenceToXContentCompressor

java.lang.Object
org.elasticsearch.client.ml.inference.InferenceToXContentCompressor

public final class InferenceToXContentCompressor extends Object
Collection of helper methods. Similar to CompressedXContent, but this utilizes GZIP.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends org.elasticsearch.xcontent.ToXContentObject>
    String
    deflate(T objectToCompress)
     
    static <T> T
    inflate(String compressedString, org.elasticsearch.core.CheckedFunction<org.elasticsearch.xcontent.XContentParser,T,IOException> parserFunction, org.elasticsearch.xcontent.NamedXContentRegistry xContentRegistry)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • deflate

      public static <T extends org.elasticsearch.xcontent.ToXContentObject> String deflate(T objectToCompress) throws IOException
      Throws:
      IOException
    • inflate

      public static <T> T inflate(String compressedString, org.elasticsearch.core.CheckedFunction<org.elasticsearch.xcontent.XContentParser,T,IOException> parserFunction, org.elasticsearch.xcontent.NamedXContentRegistry xContentRegistry) throws IOException
      Throws:
      IOException