java.lang.Object
org.elasticsearch.transport.TransportDecompressor
org.elasticsearch.transport.Lz4TransportDecompressor
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Releasable
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.
-
Field Summary
Fields inherited from class org.elasticsearch.transport.TransportDecompressor
hasSkippedHeader, pageLength, pageOffset, pages
-
Constructor Summary
ConstructorDescriptionLz4TransportDecompressor
(Recycler<org.apache.lucene.util.BytesRef> recycler) -
Method Summary
Modifier and TypeMethodDescriptionint
decompress
(BytesReference bytesReference) Decompress the provided bytesboolean
isClosed()
Returnstrue
if and only if the end of the compressed stream has been reached.Methods inherited from class org.elasticsearch.transport.TransportDecompressor
close, maybeAddNewPage, pollDecompressedPage, pollLastPage
-
Constructor Details
-
Lz4TransportDecompressor
-
-
Method Details
-
getScheme
- Specified by:
getScheme
in classTransportDecompressor
-
decompress
Description copied from class:TransportDecompressor
Decompress the provided bytes- Specified by:
decompress
in classTransportDecompressor
- Parameters:
bytesReference
- to decompress- Returns:
- number of compressed bytes consumed
- Throws:
IOException
-
isClosed
public boolean isClosed()Returnstrue
if and only if the end of the compressed stream has been reached.
-