VariantContextWriter
, Closeable
, AutoCloseable
public class AsyncVariantContextWriter extends AbstractAsyncWriter<VariantContext> implements VariantContextWriter
DEFAULT_QUEUE_SIZE
Constructor | 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 | Description |
---|---|---|
void |
add(VariantContext vc) |
|
boolean |
checkError() |
|
protected 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, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public 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 String getThreadNamePrefix()
AbstractAsyncWriter
getThreadNamePrefix
in class AbstractAsyncWriter<VariantContext>
public void add(VariantContext vc)
add
in interface VariantContextWriter
public void writeHeader(VCFHeader header)
VariantContextWriter
writeHeader
in interface VariantContextWriter
header
- headerpublic boolean checkError()
checkError
in interface VariantContextWriter
public void setHeader(VCFHeader header)
VariantContextWriter
setHeader
in interface VariantContextWriter
header
- VCF header