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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfinish()voidfinish(long duration)Finish.Gets log prefix.doubleGets max progress.voidprintToLog(String message)voidprintToLogDebug(String message)voidregisterProgressListener(com.strategyquant.tradinglib.databank.IProgressListener progressListener)Register progress listener.voidReset.voidsetLogPrefix(String logPrefix)Sets log prefix.voidsetProgress(long progress)Sets progress.voidsetProjectName(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, unregisterStatusListenerMethods inherited from class com.strategyquant.tradinglib.project.RunningStatusBase
getRunningStatus, setProjectStatusListener, setRunningStatus
-
Field Details
-
Log
public static final org.slf4j.Logger LogThe constant Log.
-
-
Constructor Details
-
ProgressEngine
Instantiates a new Progress engine.- Parameters:
projectName- the project name
-
-
Method Details
-
printToLogDebug
- Overrides:
printToLogDebugin classcom.strategyquant.tradinglib.project.StopPauseEngine
-
printToLog
- Overrides:
printToLogin classcom.strategyquant.tradinglib.project.StopPauseEngine
-
reset
Reset.- Parameters:
taskName- the task namemaxProgress- 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
Sets log prefix.- Parameters:
logPrefix- the log prefix
-
finish
public void finish()- Overrides:
finishin classcom.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
Gets log prefix.- Returns:
- the log prefix
-
setProjectName
Sets project name.- Parameters:
projectName- the project name
-