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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
int
decompress(BytesReference bytesReference)
Decompress the provided bytesboolean
isClosed()
Returnstrue
if and only if the end of the compressed stream has been reached.pollDecompressedPage(boolean isEOS)
-
Constructor Details
-
Lz4TransportDecompressor
-
-
Method Details
-
pollDecompressedPage
- Specified by:
pollDecompressedPage
in interfaceTransportDecompressor
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.elasticsearch.core.Releasable
- Specified by:
close
in interfaceTransportDecompressor
-
decompress
Description copied from interface:TransportDecompressor
Decompress the provided bytes- Specified by:
decompress
in interfaceTransportDecompressor
- 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.
-