public abstract class AbstractBatchDataOutputStreamRecordMetrics extends AbstractBatchDataStream implements AbstractBatchDataOutputStream, AbstractBatchDataStreamRecordMetrics, RecordMetrics, java.io.Externalizable
RecordMetrics.MetricNamejobStepKey| Constructor and Description |
|---|
AbstractBatchDataOutputStreamRecordMetrics() |
| Modifier and Type | Method and Description |
|---|---|
abstract java.lang.String |
_externalizeCheckpointInformation()
Abstract method implemented by sub class.
|
abstract void |
_internalizeCheckpointInformation(java.lang.String token)
Abstract method implemented by sub class.
|
abstract void |
_positionAtCurrentCheckpoint()
Abstract method implemented by sub class.
|
protected abstract void |
_write(java.lang.Object record)
Abstract method implemented by sub class.
|
void |
addSkipListener(SkipListener skipListener)
Add a SkipListener callback to the BDS.
|
protected void |
endRPSMetric() |
java.lang.String |
externalizeCheckpointInformation()
Encode record metric data at the beginning of the token, then call
_externalizeCheckpointInformation, implemented by the sub class, and
append whatever it returns to the end of the token.
|
abstract void |
flush()
Flushes the output stream
|
long |
getCumulativeTime() |
long |
getMetric(RecordMetrics.MetricName metricName)
Returns the value of the batch data stream metric specified
|
long |
getRecordCount() |
protected com.ibm.ws.gridcontainer.batch.impl.SkipHandler |
getSkipHandler() |
void |
initialize(java.lang.String name,
java.lang.String jobstepId)
Called during stream initialization.
|
void |
internalizeCheckpointInformation(java.lang.String token)
Parse record metric data from the beginning of the token, then call
_internalizeCheckpointInformation, implemented by the sub class,
passing the rest of the token.
|
void |
positionAtCurrentCheckpoint()
This metohd calls the sub class (via _positionAtCurrentCheckpoint)
to allow the sub class to position the BDS properly, then it sets its
own checkpoint-related record metric values.
|
void |
readExternal(java.io.ObjectInput in) |
protected void |
setExceptionRecord(java.lang.Object record) |
void |
setMetric(RecordMetrics.MetricName metricName,
long value) |
protected void |
setSkipMetric() |
protected void |
startRPSMetric() |
void |
write(java.lang.Object record)
Writes the given record to the output stream.
|
void |
writeExternal(java.io.ObjectOutput out) |
abstract void |
writeHeader(java.lang.Object record)
Writes header data
|
close, getJobstepId, getName, getProperties, getProperty, getRequiredProperty, getRequiredProperty, initialize, intermediateCheckpoint, isRestart, loadClass, open, positionAtInitialCheckpoint, setProperties, setRestartpublic AbstractBatchDataOutputStreamRecordMetrics()
public void initialize(java.lang.String name,
java.lang.String jobstepId)
throws BatchContainerDataStreamException
AbstractBatchDataStreaminitialize in interface com.ibm.batch.api.BatchDataStreaminitialize in class AbstractBatchDataStreamname - the logical name of the BDS, this name is used to
locate the resource in the job's xJCL.jobstepId - an identifier that represents the step within the batch
job that is being run. This id is used to locate the resource in the job's
xJCL.BatchContainerDataStreamExceptionprotected abstract void _write(java.lang.Object record)
throws java.lang.Exception
java.lang.Exceptionpublic void write(java.lang.Object record)
throws java.lang.Exception
write in interface AbstractBatchDataOutputStreamrecord - java.lang.Exceptionpublic abstract void flush()
throws java.lang.Exception
flush in interface AbstractBatchDataOutputStreamjava.lang.Exceptionpublic abstract void writeHeader(java.lang.Object record)
throws java.lang.Exception
writeHeader in interface AbstractBatchDataOutputStreamrecord - java.lang.Exceptionpublic abstract void _internalizeCheckpointInformation(java.lang.String token)
token - the checkpoint tokenpublic final void internalizeCheckpointInformation(java.lang.String token)
internalizeCheckpointInformation in interface com.ibm.batch.api.BatchDataStreaminternalizeCheckpointInformation in class AbstractBatchDataStreamtoken - the checkpoint tokenpublic abstract java.lang.String _externalizeCheckpointInformation()
public final java.lang.String externalizeCheckpointInformation()
externalizeCheckpointInformation in interface com.ibm.batch.api.BatchDataStreamexternalizeCheckpointInformation in class AbstractBatchDataStreampublic abstract void _positionAtCurrentCheckpoint()
throws BatchContainerDataStreamException
public void positionAtCurrentCheckpoint()
throws BatchContainerDataStreamException
positionAtCurrentCheckpoint in interface com.ibm.batch.api.BatchDataStreamBatchContainerDataStreamExceptionpublic void addSkipListener(SkipListener skipListener)
Add a SkipListener callback to the BDS. The SkipListener is called by the BDS whenever the BDS fails to read or write a record and is configured to skip the failed record.
addSkipListener in interface AbstractBatchDataStreamRecordMetricsskipListener - The user-implemented SkipListener callback.public long getMetric(RecordMetrics.MetricName metricName)
RecordMetricsgetMetric in interface RecordMetricsmetricName - - skip or rpspublic long getRecordCount()
public long getCumulativeTime()
public void setMetric(RecordMetrics.MetricName metricName, long value)
protected void startRPSMetric()
protected void endRPSMetric()
protected void setExceptionRecord(java.lang.Object record)
protected void setSkipMetric()
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionprotected com.ibm.ws.gridcontainer.batch.impl.SkipHandler getSkipHandler()