Package org.elasticsearch.transport
Class Lz4TransportDecompressor
org.elasticsearch.transport.Lz4TransportDecompressor
- All Implemented Interfaces:
,
,
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 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)
Methods inherited from class java.lang.
, , , , , , , , , ,
-
Constructor Details
-
Lz4TransportDecompressor
-
-
Method Details
-
pollDecompressedPage
- Specified by:
pollDecompressedPage
in interfaceTransportDecompressor
-
close
public void close()- Specified by:
in interface
- Specified by:
in interface
- 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:
-
isClosed
public boolean isClosed()Returnstrue
if and only if the end of the compressed stream has been reached.
-