Package org.elasticsearch.transport
Class Lz4TransportDecompressor
java.lang.Object
org.elasticsearch.transport.Lz4TransportDecompressor
- All Implemented Interfaces:
Closeable,AutoCloseable,org.elasticsearch.core.Releasable,TransportDecompressor
This file is forked from the https://netty.io project. In particular it forks the following file
io.netty.handler.codec.compression.Lz4FrameDecoder.
It modifies the original netty code to operate on byte arrays opposed to ByteBufs.
Additionally, it integrates the decompression code to work in the Elasticsearch transport
pipeline, Finally, it replaces the custom Netty decoder exceptions.
This class is necessary as Netty is not a dependency in Elasticsearch server module.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intdecompress(BytesReference bytesReference)Decompress the provided bytesbooleanisClosed()Returnstrueif and only if the end of the compressed stream has been reached.pollDecompressedPage(boolean isEOS)
-
Constructor Details
-
Lz4TransportDecompressor
-
-
Method Details
-
pollDecompressedPage
- Specified by:
pollDecompressedPagein interfaceTransportDecompressor
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable- Specified by:
closein interfaceTransportDecompressor
-
decompress
Description copied from interface:TransportDecompressorDecompress the provided bytes- Specified by:
decompressin interfaceTransportDecompressor- Parameters:
bytesReference- to decompress- Returns:
- number of compressed bytes consumed
- Throws:
IOException
-
isClosed
public boolean isClosed()Returnstrueif and only if the end of the compressed stream has been reached.
-