Sleep slows down data records going through it.
|Component||Same input metadata||Sorted inputs||Inputs||Outputs||Each to all outputs||Java||CTL||Auto-propagated metadata|
Sleep receives data records through its single input port, delays each input record by a specified number of milliseconds and copies each input record to all connected output ports. Total delay does not depend on the number of output ports. It only depends on the number of input records.
The delay can be specified statically by the Delay attribute or dynamically based on an incoming record content in the Input mapping attribute.
|Input||0||For input data records||Any|
|Output||0||For copied data records||Input 0|
|1-n||For copied data records||Input 0|
All metadata must be the same.
Metadata can be propagated through this component.
Delay of processing of each input record; by default in milliseconds, but other time units may be used. Total delay of parsing is equal to the this value multiplied by the number of input records.
|0-N or time units|
Delay for input records processing can be also defined dynamically. You can determine how long should a record be delayed based on an incoming record content. So delay can be dynamically changed by your CTL code. Possible outputs of the mapping are two different values - string value delay, which can be populated by a same value as the component's attribute Delay, for example '15s'. The second output value delayMillis can specify delay by number of milliseconds.
 One of these must be specified.
When using Sleep, remember that records are sent out from the component only after its buffer gets full (by default). Sometimes you might need to:
send a record to Sleep
have it delayed by a specified number of seconds
send this very record to output ports immediately
In such case, you have to change settings of the edge outgoing from Sleep to Direct fast propagate. For more information, see Types of Edges.
An unconnected Sleep component can be used to insert a pause between different phases of a graph. Put an extra phase between the two phases with single unconnected Sleep component.