Class ProgressEngine

java.lang.Object
com.strategyquant.tradinglib.project.RunningStatusBase
com.strategyquant.tradinglib.project.StopPauseEngine
com.strategyquant.tradinglib.project.ProgressEngine
All Implemented Interfaces:
IStopPauseStatus

public class ProgressEngine extends com.strategyquant.tradinglib.project.StopPauseEngine
The type Progress engine.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static org.slf4j.Logger
    The constant Log.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProgressEngine​(String projectName)
    Instantiates a new Progress engine.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    finish​(long duration)
    Finish.
    Gets log prefix.
    double
    Gets max progress.
    void
    printToLog​(String message)
     
    void
    printToLogDebug​(String message)
     
    void
    registerProgressListener​(com.strategyquant.tradinglib.databank.IProgressListener progressListener)
    Register progress listener.
    void
    reset​(String taskName, long maxProgress)
    Reset.
    void
    setLogPrefix​(String logPrefix)
    Sets log prefix.
    void
    setProgress​(long progress)
    Sets progress.
    void
    setProjectName​(String projectName)
    Sets project name.

    Methods inherited from class com.strategyquant.tradinglib.project.StopPauseEngine

    checkPaused, checkRunning, done, error, isFinished, isPaused, isStopped, isStoppedNotFinished, pause, registerStatusListener, reset, resume, start, stop, stop, unregisterStatusListener

    Methods inherited from class com.strategyquant.tradinglib.project.RunningStatusBase

    getRunningStatus, setProjectStatusListener, setRunningStatus

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • Log

      public static final org.slf4j.Logger Log
      The constant Log.
  • Constructor Details

    • ProgressEngine

      public ProgressEngine(String projectName)
      Instantiates a new Progress engine.
      Parameters:
      projectName - the project name
  • Method Details

    • printToLogDebug

      public void printToLogDebug(String message)
      Overrides:
      printToLogDebug in class com.strategyquant.tradinglib.project.StopPauseEngine
    • printToLog

      public void printToLog(String message)
      Overrides:
      printToLog in class com.strategyquant.tradinglib.project.StopPauseEngine
    • reset

      public void reset(String taskName, long maxProgress)
      Reset.
      Parameters:
      taskName - the task name
      maxProgress - the max progress
    • setProgress

      public void setProgress(long progress)
      Sets progress.
      Parameters:
      progress - the progress
    • getMaxProgress

      public double getMaxProgress()
      Gets max progress.
      Returns:
      the max progress
    • setLogPrefix

      public void setLogPrefix(String logPrefix)
      Sets log prefix.
      Parameters:
      logPrefix - the log prefix
    • finish

      public void finish()
      Overrides:
      finish in class com.strategyquant.tradinglib.project.StopPauseEngine
    • finish

      public void finish(long duration)
      Finish.
      Parameters:
      duration - the duration
    • registerProgressListener

      public void registerProgressListener(com.strategyquant.tradinglib.databank.IProgressListener progressListener)
      Register progress listener.
      Parameters:
      progressListener - the progress listener
    • getLogPrefix

      public String getLogPrefix()
      Gets log prefix.
      Returns:
      the log prefix
    • setProjectName

      public void setProjectName(String projectName)
      Sets project name.
      Parameters:
      projectName - the project name