Class TimedSource

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, Pausable, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, FlowPauseStateListener, VariableChangeListener, AtomicExecution, Actor, ActorHandler, CallableActorUser, ControlActor, ErrorHandler, Flushable, MutableActorHandler, OptionalCallableActor, OutputProducer, SubFlowWrapUp, TimedActor, Serializable, Comparable

    public class TimedSource
    extends SequenceSource
    implements TimedActor
    Encapsulates a sequence of flow items, with the last one generating the output for this meta-source.
    Times how long the sub-source execution takes and sends the time in milli-seconds (as double) in a adams.flow.container.TimingContainer container to the specified callable actor.

    Input/output:
    - generates:
       adams.flow.core.Unknown


    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
        min-user-mode: Expert
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: TimedSource
     
    -annotation <adams.core.base.BaseAnnotation> (property: annotations)
        The annotations to attach to this actor.
        default:
     
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded
        as it is.
        default: false
     
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow execution at this level gets stopped in case this
        actor encounters an error; the error gets propagated; useful for critical
        actors.
        default: false
        min-user-mode: Expert
     
    -silent <boolean> (property: silent)
        If enabled, then no errors are output in the console; Note: the enclosing
        actor handler must have this enabled as well.
        default: false
        min-user-mode: Expert
     
    -finish-before-stopping <boolean> (property: finishBeforeStopping)
        If enabled, actor first finishes processing all data before stopping.
        default: false
     
    -stopping-timeout <int> (property: stoppingTimeout)
        The timeout in milliseconds when waiting for actors to finish (<= 0 for
        infinity; see 'finishBeforeStopping').
        default: -1
        minimum: -1
     
    -stopping-warning-interval <int> (property: stoppingWarningInterval)
        The interval in milliseconds to output logging warnings if the actors haven't
        stopped yet (and no stopping timeout set); no warning if <= 0.
        default: 10000
        minimum: -1
     
    -actor <adams.flow.core.Actor> [-actor ...] (property: actors)
        All the actors that define this sequence.
        default:
     
    -timing-enabled <boolean> (property: timingEnabled)
        If enabled, then the actors performs timing on its execution.
        default: true
     
    -prefix <java.lang.String> (property: prefix)
        The prefix to store in the timing container; automatically expands variables.
        default:
     
    -callable <adams.flow.core.CallableActorReference> (property: callableName)
        The name of the callable actor to use.
        default: unknown
     
    -optional <boolean> (property: optional)
        If enabled, then the callable actor is optional, ie no error is raised if
        not found, merely ignored.
        default: false
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • BACKUP_CALLABLEACTOR

        public static final String BACKUP_CALLABLEACTOR
        the key for backing up the callable actor.
        See Also:
        Constant Field Values
      • BACKUP_CONFIGURED

        public static final String BACKUP_CONFIGURED
        the key for backing up the configured state.
        See Also:
        Constant Field Values
      • m_TimingEnabled

        protected boolean m_TimingEnabled
        whether timing is enabled.
      • m_Prefix

        protected String m_Prefix
        the prefix to use.
      • m_CallableActor

        protected Actor m_CallableActor
        the callable actor.
      • m_Configured

        protected boolean m_Configured
        whether the callable actor has been configured.
      • m_Optional

        protected boolean m_Optional
        whether the callable actor is optional.
      • m_StopWatch

        protected transient org.apache.commons.lang3.time.StopWatch m_StopWatch
        the stopwatch for timing.
    • Constructor Detail

      • TimedSource

        public TimedSource()