edu.unh.sdb.datasource
Class BufferedOneDDataSink
java.lang.Object
edu.unh.sdb.datasource.DataSink
edu.unh.sdb.datasource.OneDDataSink
edu.unh.sdb.datasource.BufferedOneDDataSink
public class BufferedOneDDataSink
- extends OneDDataSink
Constructor Summary |
BufferedOneDDataSink(java.lang.String filename,
RecordDescriptor rd,
int bufferSize)
Constructs a one dimensional Datasink without specifying a bounds for the index space. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bytes
protected byte[] bytes
byteArrayLength
protected int byteArrayLength
buffer
protected java.nio.ByteBuffer buffer
BufferedOneDDataSink
public BufferedOneDDataSink(java.lang.String filename,
RecordDescriptor rd,
int bufferSize)
- Constructs a one dimensional Datasink without specifying a bounds for the index space. If this
constructor is used, then an IndexSpaceID cannot be passed to the write() method.
Datums are simply written one after the other. This DataSink uses a buffer to store data in
memory until an entire block of data can be written to disk. The bufferSize argument determines
the size of this buffer, expressed as the number of datums than can be held.
activate
public void activate()
- Overrides:
activate
in class OneDDataSink
deactivate
public void deactivate()
- Overrides:
deactivate
in class DataSink
write
public void write(Datum d,
IndexSpaceID id)
- Overrides:
write
in class OneDDataSink
write
public void write(Datum d)
- Overrides:
write
in class OneDDataSink
writeBuffer
protected void writeBuffer()