public abstract class AbstractBatchDataInputStreamRecordMetrics extends AbstractBatchDataStream implements AbstractBatchDataInputStream, AbstractBatchDataStreamRecordMetrics, RecordMetrics, java.io.Externalizable
RecordMetrics.MetricNamejobStepKey| Constructor and Description |
|---|
AbstractBatchDataInputStreamRecordMetrics() |
| Modifier and Type | Method and Description |
|---|---|
abstract java.lang.String |
_externalizeCheckpointInformation()
Abstract method implemented by sub class.
|
protected abstract boolean |
_hasNext()
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 java.lang.Object |
_read()
Abstract method implemented by sub class.
|
protected abstract java.lang.Object |
_read(java.lang.Object parameters)
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 the sub class
(via _externalizeCheckpointInformation) and append whatever it returns to the
end of the token.
|
abstract java.lang.Object |
fetchHeader()
Returns the header data if any
|
long |
getCumulativeTime() |
long |
getMetric(RecordMetrics.MetricName metricName)
Returns the value of the batch data stream metric specified
|
long |
getRecordCount() |
boolean |
hasNext()
Return a boolean indicating if there is unread data in the Input Stream.
|
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 the sub
class (via _internalizeCheckpointInformation), passing the rest of the token.
|
void |
positionAtCurrentCheckpoint()
This method calls the sub class (via _positionAtCurrentCheckpoint) to allow the sub class
to position the BDS properly, then it applies checkpoint-related record metric settings
to the BDS.
|
java.lang.Object |
read()
Return the next record.
|
java.lang.Object |
read(java.lang.Object parameters)
Return the next record based on the input parameters.
|
void |
readExternal(java.io.ObjectInput in) |
protected void |
setSkipMetric() |
protected void |
startRPSMetric() |
void |
writeExternal(java.io.ObjectOutput out) |
close, getJobstepId, getName, getProperties, getProperty, getRequiredProperty, getRequiredProperty, initialize, intermediateCheckpoint, isRestart, loadClass, open, positionAtInitialCheckpoint, setProperties, setRestartpublic AbstractBatchDataInputStreamRecordMetrics()
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 boolean _hasNext()
throws java.lang.Exception
java.lang.Exceptionpublic final boolean hasNext()
throws java.lang.Exception
hasNext in interface AbstractBatchDataInputStreamjava.lang.Exceptionprotected abstract java.lang.Object _read()
throws java.lang.Exception
java.lang.Exceptionpublic final java.lang.Object read()
throws java.lang.Exception
read in interface AbstractBatchDataInputStreamjava.lang.Exceptionprotected abstract java.lang.Object _read(java.lang.Object parameters)
throws java.lang.Exception
java.lang.Exceptionpublic final java.lang.Object read(java.lang.Object parameters)
throws java.lang.Exception
read in interface AbstractBatchDataInputStreamparameters - java.lang.Exceptionpublic abstract java.lang.Object fetchHeader()
AbstractBatchDataInputStreamfetchHeader in interface AbstractBatchDataInputStreampublic 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()
protected void startRPSMetric()
protected void endRPSMetric()
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.IOException