Class FastGZipEncoder
java.lang.Object
org.glassfish.jersey.spi.ContentEncoder
org.glassfish.jersey.message.GZipEncoder
ubic.gemma.rest.providers.FastGZipEncoder
- All Implemented Interfaces:
jakarta.ws.rs.ext.ReaderInterceptor, jakarta.ws.rs.ext.WriterInterceptor
@Priority(4000)
public class FastGZipEncoder
extends org.glassfish.jersey.message.GZipEncoder
Jersey's
GZipEncoder, compressing at GzipUtils.LEVEL instead of zlib's default of 6.
Every gzipped response is compressed on the fly, so the level is paid in response time.
datasets/MSSM_Cohort/singleCellDimension took 18.5 s on production, of which about 15 s was spent after
the first byte compressing 186 MB of JSON at level 6. GzipUtils has the measurements behind the level.
Registered by class name in web.xml in place of GZipEncoder, and deliberately not a
@Provider: the package scan would register it beside Jersey's, and two encoders would claim gzip.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.glassfish.jersey.message.GZipEncoder
decodeMethods inherited from class org.glassfish.jersey.spi.ContentEncoder
aroundReadFrom, aroundWriteTo, getSupportedEncodings
-
Constructor Details
-
FastGZipEncoder
public FastGZipEncoder()
-
-
Method Details
-
encode
- Overrides:
encodein classorg.glassfish.jersey.message.GZipEncoder- Throws:
IOException
-