public abstract class AbstractBatchDataInputStreamRecordMetrics extends AbstractBatchDataStream implements AbstractBatchDataInputStream, AbstractBatchDataStreamRecordMetrics, RecordMetrics, java.io.Externalizable
RecordMetrics.MetricName
jobStepKey
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, setRestart
public AbstractBatchDataInputStreamRecordMetrics()
public void initialize(java.lang.String name, java.lang.String jobstepId) throws BatchContainerDataStreamException
AbstractBatchDataStream
initialize
in interface com.ibm.batch.api.BatchDataStream
initialize
in class AbstractBatchDataStream
name
- 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.BatchContainerDataStreamException
protected abstract boolean _hasNext() throws java.lang.Exception
java.lang.Exception
public final boolean hasNext() throws java.lang.Exception
hasNext
in interface AbstractBatchDataInputStream
java.lang.Exception
protected abstract java.lang.Object _read() throws java.lang.Exception
java.lang.Exception
public final java.lang.Object read() throws java.lang.Exception
read
in interface AbstractBatchDataInputStream
java.lang.Exception
protected abstract java.lang.Object _read(java.lang.Object parameters) throws java.lang.Exception
java.lang.Exception
public final java.lang.Object read(java.lang.Object parameters) throws java.lang.Exception
read
in interface AbstractBatchDataInputStream
parameters
- java.lang.Exception
public abstract java.lang.Object fetchHeader()
AbstractBatchDataInputStream
fetchHeader
in interface AbstractBatchDataInputStream
public 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.BatchDataStream
internalizeCheckpointInformation
in class AbstractBatchDataStream
token
- the checkpoint tokenpublic abstract java.lang.String _externalizeCheckpointInformation()
public final java.lang.String externalizeCheckpointInformation()
externalizeCheckpointInformation
in interface com.ibm.batch.api.BatchDataStream
externalizeCheckpointInformation
in class AbstractBatchDataStream
public abstract void _positionAtCurrentCheckpoint() throws BatchContainerDataStreamException
public void positionAtCurrentCheckpoint() throws BatchContainerDataStreamException
positionAtCurrentCheckpoint
in interface com.ibm.batch.api.BatchDataStream
BatchContainerDataStreamException
public 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 AbstractBatchDataStreamRecordMetrics
skipListener
- The user-implemented SkipListener callback.public long getMetric(RecordMetrics.MetricName metricName)
RecordMetrics
getMetric
in interface RecordMetrics
metricName
- - 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.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException