public class AppendableOutput extends Output
StreamOutput and
RecordOutput but uses the Append API to create the result object. Works
only if the output bulk info contains a valid Appendable ID._objectStore| Constructor and Description |
|---|
AppendableOutput(BulkInfo dataObject,
ObjectStoreService objectStore) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
method for aborting the stream when not committing it.
|
void |
append(byte[] data)
append bytes.
|
void |
append(byte[] data,
java.lang.Integer numberOfRecords)
append bytes.
|
void |
appendAny(Any object)
append an
Any record converted to BON to the data object. |
void |
appendRecord(Record record)
append a
Record converted to BON to the data object. |
void |
commit()
finalize the Appendable object.
|
long |
getBytesWritten() |
java.util.Map<java.lang.String,java.lang.Number> |
getCounter()
create basic counter map.
|
long |
getRecordCount()
number of Records (or Anys) appended.
|
ensureStore, getDataObject, getDurationOpen, getDurationPerform, getObjectName, getObjectStore, getStoreName, startTime, timeOpen, timePerformpublic AppendableOutput(BulkInfo dataObject, ObjectStoreService objectStore)
dataObject - The data objectobjectStore - The reference to the object store servicepublic void append(byte[] data)
throws ObjectStoreException
ObjectStoreExceptionpublic void append(byte[] data,
java.lang.Integer numberOfRecords)
throws ObjectStoreException
ObjectStoreExceptionpublic void appendRecord(Record record) throws ObjectStoreException, java.io.IOException
Record converted to BON to the data object.ObjectStoreExceptionjava.io.IOExceptionpublic void appendAny(Any object) throws ObjectStoreException, java.io.IOException
Any record converted to BON to the data object.ObjectStoreExceptionjava.io.IOExceptionpublic void commit()
throws ObjectStoreException
commit in class OutputObjectStoreExceptionpublic void abort()
throws ObjectStoreException
abort in class OutputObjectStoreExceptionpublic long getBytesWritten()
public long getRecordCount()
public java.util.Map<java.lang.String,java.lang.Number> getCounter()
IODataObjectgetCounter in class IODataObject