public class RecordOutput extends Output
Record bulks by writing one Record (or Any) at a
time. You can also directly access the underlying IpcStreamWriter BON writer, but you should not mix up
direct access to the BON writer with the writeRecord(Record) and writeAny(Any) methods._objectStore| Constructor and Description |
|---|
RecordOutput(BulkInfo dataObject,
ObjectStoreService objectStore) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
method for aborting the stream when not committing it.
|
void |
commit()
Commit the data object to objectstore.
|
long |
getBytesWritten() |
java.util.Map<java.lang.String,java.lang.Number> |
getCounter()
create basic counter map.
|
long |
getRecordCount() |
IpcStreamWriter |
getStreamWriter() |
void |
writeAny(Any any) |
void |
writeRecord(Record record) |
ensureStore, getDataObject, getDurationOpen, getDurationPerform, getObjectName, getObjectStore, getStoreName, startTime, timeOpen, timePerformpublic RecordOutput(BulkInfo dataObject, ObjectStoreService objectStore)
dataObject - The data objectobjectStore - The reference to the object store servicepublic void writeRecord(Record record) throws ObjectStoreException, java.io.IOException
record - The record to writeObjectStoreExceptionjava.io.IOExceptionpublic void writeAny(Any any) throws ObjectStoreException, java.io.IOException
any - The object to writeObjectStoreExceptionjava.io.IOExceptionpublic void commit()
throws ObjectStoreException,
java.io.IOException
commit in class OutputObjectStoreExceptionjava.io.IOExceptionpublic void abort()
throws java.io.IOException
public IpcStreamWriter getStreamWriter() throws ObjectStoreException, java.io.IOException
ObjectStoreExceptionjava.io.IOExceptionpublic long getRecordCount()
#writeRecord()public long getBytesWritten()
StreamOutput.getBytesWritten()public java.util.Map<java.lang.String,java.lang.Number> getCounter()
IODataObjectgetCounter in class IODataObject