public class AsyncVariantContextWriter extends AbstractAsyncWriter<VariantContext> implements VariantContextWriter
DEFAULT_QUEUE_SIZE| Constructor and Description |
|---|
AsyncVariantContextWriter(VariantContextWriter out)
Creates a new AsyncVariantContextWriter wrapping the provided VariantContextWriter.
|
AsyncVariantContextWriter(VariantContextWriter out,
int queueSize)
Creates an AsyncVariantContextWriter wrapping the provided VariantContextWriter and using the specified
queue size for buffer VariantContexts.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(VariantContext vc) |
boolean |
checkError() |
protected java.lang.String |
getThreadNamePrefix()
Returns the prefix to use when naming threads.
|
void |
setHeader(VCFHeader header)
Sets the VCF header so that data blocks can be written without writing the header
Exactly one of writeHeader() or setHeader() should be called when using a writer
|
protected void |
synchronouslyClose() |
protected void |
synchronouslyWrite(VariantContext item) |
void |
writeHeader(VCFHeader header)
Writes the header
|
close, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclosepublic AsyncVariantContextWriter(VariantContextWriter out)
public AsyncVariantContextWriter(VariantContextWriter out, int queueSize)
protected void synchronouslyWrite(VariantContext item)
synchronouslyWrite in class AbstractAsyncWriter<VariantContext>protected void synchronouslyClose()
synchronouslyClose in class AbstractAsyncWriter<VariantContext>protected final java.lang.String getThreadNamePrefix()
AbstractAsyncWritergetThreadNamePrefix in class AbstractAsyncWriter<VariantContext>public void add(VariantContext vc)
add in interface VariantContextWriterpublic void writeHeader(VCFHeader header)
VariantContextWriterwriteHeader in interface VariantContextWriterheader - headerpublic boolean checkError()
checkError in interface VariantContextWriterpublic void setHeader(VCFHeader header)
VariantContextWritersetHeader in interface VariantContextWriterheader - VCF header