Class JMap

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

    public class JMap
    extends Tee
    Runs jmap whenever a token gets passed through. The generated output gets tee-ed off.

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


    Conditional equivalent:
       adams.flow.control.ConditionalTee

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: JMap
     
    -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
     
    -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
     
    -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
     
    -asynchronous <boolean> (property: asynchronous)
        If enabled, the sub-actors get executed asynchronously rather than the flow
        waiting for them to finish before proceeding with execution.
        default: false
     
    -tee <adams.flow.core.Actor> [-tee ...] (property: actors)
        The actors to siphon-off the tokens to.
        default:
     
    -executable <adams.core.io.PlaceholderFile> (property: executable)
        The full path to the jmap executable.
     
    -additional <java.lang.String> (property: additionalOptions)
        Additional options for the jmap execution, supports inline variables.
        default: -histo:live
     
    -pid <long> (property: PID)
        The PID to monitor: use -1 to ignore monitoring or -999 to automatically
        determine the PID of the current JVM.
        default: -999
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Executable

        protected PlaceholderFile m_Executable
        the jmap executable.
      • m_AdditionalOptions

        protected String m_AdditionalOptions
        additional options for jmap.
      • m_PID

        protected long m_PID
        the process ID to run jmap against (-1 is ignored).
      • m_ActualPID

        protected long m_ActualPID
        the actual PID to monitor.
    • Constructor Detail

      • JMap

        public JMap()
    • Method Detail

      • getJMapExecutablePath

        protected String getJMapExecutablePath()
        Returns the full path of the JMap executable, if possible.
        Returns:
        the full path of the executable if possible, otherwise just the executable
      • setExecutable

        public void setExecutable​(PlaceholderFile value)
        Sets the jmap executable.
        Parameters:
        value - the executable
      • getExecutable

        public PlaceholderFile getExecutable()
        Returns the jmap executable.
        Returns:
        the executable
      • executableTipText

        public String executableTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setAdditionalOptions

        public void setAdditionalOptions​(String value)
        Sets the additional options for jmap.
        Parameters:
        value - the additional options
      • getAdditionalOptions

        public String getAdditionalOptions()
        Returns the additional options for jmap.
        Returns:
        the additional options
      • additionalOptionsTipText

        public String additionalOptionsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setPID

        public void setPID​(long value)
        Sets the PID to monitor.
        Parameters:
        value - the PID
      • getPID

        public long getPID()
        Returns the PID to monitor.
        Returns:
        the PID
      • PIDTipText

        public String PIDTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • canRunJMap

        protected boolean canRunJMap()
        Returns whether jmap can be run.
        Returns:
        true if jmap can be executed
      • canProcessInput

        protected boolean canProcessInput​(Token token)
        Returns whether the token can be processed in the tee actor.
        Overrides:
        canProcessInput in class AbstractTee
        Parameters:
        token - the token to process
        Returns:
        true if token can be processed
      • createTeeToken

        protected Token createTeeToken​(Token token)
        Creates the token to tee-off.
        Overrides:
        createTeeToken in class AbstractTee
        Parameters:
        token - the input token
        Returns:
        the token to tee-off