Class DebugControlThread

  • All Implemented Interfaces:
    java.lang.Runnable

    public class DebugControlThread
    extends java.lang.Object
    implements java.lang.Runnable
    The Class DebugControlThread.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int checkpointFrequency
      The checkpoint frequency.
      private CPMEngine cpm
      The cpm.
      private java.lang.String fileName
      The file name.
      private java.lang.Object lockForPause
      The lock for pause.
      private static java.lang.String NOTFOUND
      The Constant NOTFOUND.
      private boolean pause
      The pause.
      private boolean stop
      The stop.
    • Constructor Summary

      Constructors 
      Constructor Description
      DebugControlThread​(CPMEngine aCpm, java.lang.String aFilename, int aCheckpointFrequency)
      Instantiates a new debug control thread.
    • Field Detail

      • NOTFOUND

        private static final java.lang.String NOTFOUND
        The Constant NOTFOUND.
        See Also:
        Constant Field Values
      • fileName

        private java.lang.String fileName
        The file name.
      • stop

        private volatile boolean stop
        The stop.
      • checkpointFrequency

        private int checkpointFrequency
        The checkpoint frequency.
      • pause

        private boolean pause
        The pause.
      • lockForPause

        private final java.lang.Object lockForPause
        The lock for pause.
    • Constructor Detail

      • DebugControlThread

        public DebugControlThread​(CPMEngine aCpm,
                                  java.lang.String aFilename,
                                  int aCheckpointFrequency)
        Instantiates a new debug control thread.
        Parameters:
        aCpm - the a cpm
        aFilename - the a filename
        aCheckpointFrequency - the a checkpoint frequency
    • Method Detail

      • start

        public void start()
                   throws java.lang.RuntimeException
        Start.
        Throws:
        java.lang.RuntimeException - the runtime exception
      • stop

        public void stop()
        Stop.
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • interpretAndExecuteCommand

        private void interpretAndExecuteCommand​(java.lang.String aCommand)
        Interpret and execute command.
        Parameters:
        aCommand - the a command
      • deleteCheckpoint

        public void deleteCheckpoint()
        Delete checkpoint.
      • pause

        public void pause()
        Pause.
      • resume

        public void resume()
        Resume.
      • doCheckpoint

        public java.lang.String doCheckpoint()
        Do checkpoint.
        Returns:
        the string
      • exists

        public boolean exists()
        Exists.
        Returns:
        true, if successful