uk.ac.starlink.table.storage.ColumnStore Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stil Show documentation
Show all versions of stil Show documentation
Starlink Tables Infrastructure Library
package uk.ac.starlink.table.storage;
import java.io.IOException;
/**
* Defines an object which can store the data of a column, that is,
* an array of homogeneous objects.
* The store is populated sequentially, and when ready provides random access.
*
* The sequence of calls must be as follows:
*
* - Zero or more calls of {@link #acceptCell}
* - A call of {@link #endCells}
* - Zero or more calls of {@link #createReader}
*
* Behaviour will be undefined if you violate this sequence.
*
* @author Mark Taylor
* @since 21 Jun 2006
*/
public interface ColumnStore {
/**
* Writes a datum to this store.
*
* @param value the value to add
*/
void acceptCell( Object value ) throws IOException;
/**
* Signals that no more calls to acceptCell
will be made,
* and that calls to createReader
may be made.
*/
void endCells() throws IOException;
/**
* Returns an object that can provide random access to the
* cells written to this store.
*
* @return column cell reader
*/
ColumnReader createReader();
}