Home > Class Reference > ENSLIB namespace > EnsLib.RecordMap.Operation.BatchStandard

EnsLib.RecordMap.Operation.BatchStandard

abstract class EnsLib.RecordMap.Operation.BatchStandard extends EnsLib.RecordMap.Operation.Standard

Base class for writing out RecordMap batches. The batch will be written to a temporary file, and the ProcessTempFile()() callback will be invoked when complete to allow subclasses to transmit the batch to its destination.

Property Inventory (Including Private)

Method Inventory (Including Private)

Parameters

parameter RolloverKeepalive = 1;
Interval to use for checking schedule-based Rollover status. See the comments for RolloverSchedule for more detailed information.
parameter SETTINGS = UnSwizzleRecords,UseDefaultBatch:Basic,DefaultBatchClass:Basic,WriteEmptyBatches:Basic,OpenMode,ReOpenMode,RolloverSchedule:Basic,RolloverLimit:Basic,DelayDefaultBatchOutput:Basic,IntermediateFilePath:Basic;
Inherited description: List of properties can be set as settings in the configuration file format is a comma separated list of property names

Properties (Including Private)

property CheckingRollover as %Boolean [ Private , InitialExpression = 0 , Transient ];
Flag to indicate whether a Rollover check is in progress.
Property methods: CheckingRolloverDisplayToLogical(), CheckingRolloverGet(), CheckingRolloverIsValid(), CheckingRolloverLogicalToDisplay(), CheckingRolloverNormalize(), CheckingRolloverSet()
property DefaultBatchClass as Ens.DataType.Class;
The classname of the Batch class to be used for the default Batch.
Property methods: DefaultBatchClassDisplayToLogical(), DefaultBatchClassGet(), DefaultBatchClassIsValid(), DefaultBatchClassLogicalToDisplay(), DefaultBatchClassLogicalToOdbc(), DefaultBatchClassNormalize(), DefaultBatchClassSet()
property DelayDefaultBatchOutput as %Boolean [ InitialExpression = 0 ];
When UseDefaultBatch is true, this flag controls whether data is appended to a temporary file as each record arrives, or whether all the data is written out to the temporary file when the batch is rolled over.
Property methods: DelayDefaultBatchOutputDisplayToLogical(), DelayDefaultBatchOutputGet(), DelayDefaultBatchOutputIsValid(), DelayDefaultBatchOutputLogicalToDisplay(), DelayDefaultBatchOutputNormalize(), DelayDefaultBatchOutputSet()
property IntermediateFilePath as %String (MAXLEN = 1000);
The directory to use when creating a temporary file to write out the contents of a batch. If no directory is specified, then the temporary file location for the namespace is used. When the Ensemble instance is running as part of a failover cluster or mirror with a shared or replicated disk, this path should be on a file system that is visible to both instances, as the operation uses an intermediate file to collect record data as each record is processed by the operation. When a batch object is sent to the operation or when DelayDefaultBatchOutput is true and a default batch is rolled over, the intermediate file is only used for a short interval before being handed off to the adapter for transmission. When individual records are sent to the operation, the intermediate file will be in use until the operation receives a trigger to output the entire batch, which may be many hours after the first record is received.
Property methods: IntermediateFilePathDisplayToLogical(), IntermediateFilePathGet(), IntermediateFilePathIsValid(), IntermediateFilePathLogicalToDisplay(), IntermediateFilePathLogicalToOdbc(), IntermediateFilePathNormalize(), IntermediateFilePathSet()
property OpenMode as %String [ InitialExpression = "RWN" ];
Mode to open the temporary file with when creating a new file for a batch. See the documentation for %IO.FileStream and file devices for more information on the available options.
Property methods: OpenModeDisplayToLogical(), OpenModeGet(), OpenModeIsValid(), OpenModeLogicalToDisplay(), OpenModeLogicalToOdbc(), OpenModeNormalize(), OpenModeSet()
property ReOpenMode as %String [ InitialExpression = "RW" ];
Mode to open the temporary file with when reopening an existing file for a batch. See the documentation for %IO.FileStream and file devices for more information on the available options.
Property methods: ReOpenModeDisplayToLogical(), ReOpenModeGet(), ReOpenModeIsValid(), ReOpenModeLogicalToDisplay(), ReOpenModeLogicalToOdbc(), ReOpenModeNormalize(), ReOpenModeSet()
property RolloverLimit as %Integer (MINVAL = 0) [ InitialExpression = 0 ];
Provide a limit to the number of messages which will be included in the current default Batch. UseDefaultBatch must be enabled for this setting to take effect. If this number is 0, the application will be reponsible for enforcing batch rollovers by either sending BatchRolloverRequest messages from other components or by making use of the RolloverSchedule property. Note that this limit is evaluated after checking RolloverSchedule.
Property methods: RolloverLimitDisplayToLogical(), RolloverLimitGet(), RolloverLimitIsValid(), RolloverLimitLogicalToDisplay(), RolloverLimitNormalize(), RolloverLimitSet()
property RolloverSchedule as %String);
A schedule string to control when the default Batch ought to be rolled over. UseDefaultBatch must be enabled for this setting to take effect. The schedule string takes the same format as the standard schedule string for a component, with one exception: only START strings are permitted. At any time when a START is scheduled to occur, the current default Batch will be written out and replaced with a new default Batch. Note that the RolloverSchedule will be evaluated before checking RolloverLimit.
Property methods: RolloverScheduleDisplayToLogical(), RolloverScheduleGet(), RolloverScheduleIsValid(), RolloverScheduleLogicalToDisplay(), RolloverScheduleLogicalToOdbc(), RolloverScheduleNormalize(), RolloverScheduleSet()
property UnSwizzleRecords as %Boolean [ InitialExpression = 1 ];
UnSwizzle each record from memory after it has been written to the output stream. This option is used when processing an entire batch at once.
Property methods: UnSwizzleRecordsDisplayToLogical(), UnSwizzleRecordsGet(), UnSwizzleRecordsIsValid(), UnSwizzleRecordsLogicalToDisplay(), UnSwizzleRecordsNormalize(), UnSwizzleRecordsSet()
property UseDefaultBatch as %Boolean [ InitialExpression = 0 ];
Flag to indicate whether Records which are not assigned to a batch already should be added to a DefaultBatch. This DefaultBatch will be written out either when the operation receives a BatchRolloverRequest or the batch object itself. If RolloverSchedule is used to specify times when a Batch should be rolled over, then the current default Batch will be written out based on the specified schedule.
Property methods: UseDefaultBatchDisplayToLogical(), UseDefaultBatchGet(), UseDefaultBatchIsValid(), UseDefaultBatchLogicalToDisplay(), UseDefaultBatchNormalize(), UseDefaultBatchSet()
property WriteEmptyBatches as %Boolean [ InitialExpression = 0 ];
Control whether Batch objects which contain no records should be written out. Note that this applies to all batches, including the default Batch.
Property methods: WriteEmptyBatchesDisplayToLogical(), WriteEmptyBatchesGet(), WriteEmptyBatchesIsValid(), WriteEmptyBatchesLogicalToDisplay(), WriteEmptyBatchesNormalize(), WriteEmptyBatchesSet()

Methods (Including Private)

method CheckRollover(pLocked As %Boolean = 0) as %Status
Check whether the current default Batch needs to be rolled over. This check is not run if UseDefaultBatch is false or if RolloverSchedule is not specified. Note that the check based on RolloverLimit is performed after the record has been written out in PutRecord()().
method CreateDefaultBatch(Output pDefaultBatch As EnsLib.RecordMap.Batch) as %Status
Callback to create a new default Batch. This method can be overridden in subclasses to further