public abstract class AbstractBatchDataStream extends java.lang.Object implements BatchDataStream
BatchDataStream.| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
jobStepKey |
| Constructor and Description |
|---|
AbstractBatchDataStream() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Close underlying implementation stream.
|
abstract java.lang.String |
externalizeCheckpointInformation()
This method is called just before a checkpoint is to be taken by the batch container.
|
java.lang.String |
getJobstepId() |
java.lang.String |
getName()
The getName method returns the logical name of the BDS that was received in the initialize method.
|
java.util.Properties |
getProperties()
The getProperties method returns the bds properties specified in the xJCL and received in the setProperties
method.
|
protected java.lang.String |
getProperty(java.lang.String key)
Convenience method to return a property value.
|
protected java.lang.String |
getRequiredProperty(java.util.Properties props,
java.lang.String key) |
protected java.lang.String |
getRequiredProperty(java.lang.String key)
Convenience method to return a property value.
|
protected abstract void |
initialize(java.util.Properties props)
This method is invoked during stream initialization.
|
void |
initialize(java.lang.String name,
java.lang.String jobstepId)
Called during stream initialization.
|
void |
intermediateCheckpoint()
LREE calls this method after a checkpoint is taken
This implementation does nothing; subclasses may override. |
abstract void |
internalizeCheckpointInformation(java.lang.String token)
Parse restart token supplied by LREE.
|
java.lang.Boolean |
isRestart() |
protected java.lang.Object |
loadClass(java.lang.String className) |
abstract void |
open()
Opens delegate stream.
|
abstract void |
positionAtInitialCheckpoint()
Positions the stream to the initial checkpoint (i.e., the beginning
of the stream).
|
void |
setProperties(java.util.Properties props)
LREE calls this method to tell us our properties
as specified in the xJCL.
|
protected void |
setRestart(boolean restart)
Sets the 'restarting' flag on this BDS.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpositionAtCurrentCheckpointpublic abstract void close()
throws BatchContainerDataStreamException
close in interface com.ibm.batch.api.BatchDataStreamBatchContainerDataStreamException - Underlying implementation stream threw an exception
in its close() method.public abstract void internalizeCheckpointInformation(java.lang.String token)
throws java.lang.RuntimeException
internalizeCheckpointInformation in interface com.ibm.batch.api.BatchDataStreamtoken - - This is a string that was created by the
BDS that was returned to the Batch Execution Environment on the externalizeCheckpointInformation
method. This String is opaque to anyone but the BDS, so only the
BDS can interpret its content.java.lang.RuntimeException - Restart token could not be parsed as an integer.public abstract void open()
throws BatchContainerDataStreamException
open in interface com.ibm.batch.api.BatchDataStreamBatchContainerDataStreamException - Error opening delegate stream.public abstract void positionAtInitialCheckpoint()
throws BatchContainerDataStreamException
positionAtInitialCheckpoint in interface com.ibm.batch.api.BatchDataStreamBatchContainerDataStreamException - Error positioning the stream.protected abstract void initialize(java.util.Properties props)
props - public abstract java.lang.String externalizeCheckpointInformation()
externalizeCheckpointInformation in interface com.ibm.batch.api.BatchDataStreampublic java.lang.String getJobstepId()
public java.lang.String getName()
BatchDataStreamgetName in interface com.ibm.batch.api.BatchDataStreampublic java.util.Properties getProperties()
BatchDataStreamThe getProperties method returns the bds properties specified in the xJCL and received in the setProperties method.
getProperties in interface com.ibm.batch.api.BatchDataStreamprotected java.lang.String getProperty(java.lang.String key)
key - Property key.protected java.lang.String getRequiredProperty(java.lang.String key)
key - Property key.java.lang.RuntimeException - No value was specified for the given key.protected java.lang.String getRequiredProperty(java.util.Properties props,
java.lang.String key)
public void initialize(java.lang.String name,
java.lang.String jobstepId)
throws BatchContainerDataStreamException
initialize in interface com.ibm.batch.api.BatchDataStreamname - 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.BatchContainerDataStreamExceptionpublic void intermediateCheckpoint()
intermediateCheckpoint in interface com.ibm.batch.api.BatchDataStreampublic void setProperties(java.util.Properties props)
setProperties in interface com.ibm.batch.api.BatchDataStreamprops - Stream properties from xJCL.public java.lang.Boolean isRestart()
Boolean.FALSE if we are not restarting
Boolean.TRUE if we are restarting
null if not yet known
protected void setRestart(boolean restart)
BatchDataStream.positionAtCurrentCheckpoint() (set to true) or
BatchDataStream.positionAtInitialCheckpoint() (set to false)
methods, respectively.restart - protected java.lang.Object loadClass(java.lang.String className)