uk.ac.starlink.table.RowPipe
, uk.ac.starlink.table.TableSink
public class CacheRowPipe
extends java.lang.Object
implements uk.ac.starlink.table.RowPipe
The current implementation simply delegates to a
OnceRowPipe
and caches the result before
returning it from waitForStarTable
. This is crude,
and means that the output rows don't start to come until all the input
rows have been written to the pipe (so there's not much point using a pipe).
A future implementation should get smarter with threads to improve this.
Constructor | Description |
---|---|
CacheRowPipe() |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
acceptMetadata(uk.ac.starlink.table.StarTable meta) |
|
void |
acceptRow(java.lang.Object[] row) |
|
void |
endRows() |
|
void |
setError(java.io.IOException err) |
|
uk.ac.starlink.table.StarTable |
waitForStarTable() |
Returns a multiply-readable random access table.
|
public void acceptMetadata(uk.ac.starlink.table.StarTable meta) throws uk.ac.starlink.table.TableFormatException
acceptMetadata
in interface uk.ac.starlink.table.TableSink
uk.ac.starlink.table.TableFormatException
public void acceptRow(java.lang.Object[] row) throws java.io.IOException
acceptRow
in interface uk.ac.starlink.table.TableSink
java.io.IOException
public void endRows() throws java.io.IOException
endRows
in interface uk.ac.starlink.table.TableSink
java.io.IOException
public void setError(java.io.IOException err)
setError
in interface uk.ac.starlink.table.RowPipe
public uk.ac.starlink.table.StarTable waitForStarTable() throws java.io.IOException
waitForStarTable
in interface uk.ac.starlink.table.RowPipe
java.io.IOException
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.