htsjdk.samtools.fastq.AsyncFastqWriter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of htsjdk Show documentation
Show all versions of htsjdk Show documentation
A Java API for high-throughput sequencing data (HTS) formats
package htsjdk.samtools.fastq;
import htsjdk.samtools.util.AbstractAsyncWriter;
/**
* Implementation of a FastqWriter that provides asynchronous output.
* @author Tim Fennell
*/
public class AsyncFastqWriter extends AbstractAsyncWriter implements FastqWriter {
private final FastqWriter writer;
public AsyncFastqWriter(final FastqWriter out, final int queueSize) {
super(queueSize);
this.writer = out;
}
@Override protected String getThreadNamePrefix() { return "FastqWriterThread-"; }
@Override protected void synchronouslyWrite(final FastqRecord item) { this.writer.write(item); }
@Override protected void synchronouslyClose() { this.writer.close(); }
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy