Internal: Change LZFCompressedStreamOutput to use buffer recycler when allocating encoder

closes #7613
This commit is contained in:
Ryan Ernst 2014-09-05 13:59:10 -07:00
parent 669a7eb4f1
commit dd54025b17
1 changed files with 1 additions and 3 deletions

View File

@ -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