Internal: Change LZFCompressedStreamOutput to use buffer recycler when allocating encoder
closes #7613
This commit is contained in:
parent
669a7eb4f1
commit
dd54025b17
|
@ -28,8 +28,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class LZFCompressedStreamOutput extends CompressedStreamOutput<LZFCompressorContext> {
|
||||
|
||||
private final BufferRecycler recycler;
|
||||
|
@ -40,7 +38,7 @@ public class LZFCompressedStreamOutput extends CompressedStreamOutput<LZFCompres
|
|||
this.recycler = BufferRecycler.instance();
|
||||
this.uncompressed = this.recycler.allocOutputBuffer(LZFChunk.MAX_CHUNK_LEN);
|
||||
this.uncompressedLength = LZFChunk.MAX_CHUNK_LEN;
|
||||
this.encoder = ChunkEncoderFactory.safeInstance();
|
||||
this.encoder = ChunkEncoderFactory.safeInstance(recycler);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue