trait ProgressManagement extends AnyRef
Enables the management of the progress of a long running computation. Typically a long running progress, such as an analysis, is expected to report progress every 250 to 2000 milliseconds. It should -- however -- check every ~100 milliseconds the interrupted status to enable a timely termination.
This trait defines a call-back interface that is implemented by some class that runs an analysis and which passes an instance of it to some analysis to report progress.
- Source
- ProgressManagement.scala
- Note
Implementations of this class must be thread safe if the analysis is multi- threaded.
,Implementations must handle the case where a step that was started later finishes earlier than a previous step. In other words, even if the last step has ended, that does not mean that the analysis as a whole has already finished. Instead an implementation has to track how many steps have ended to determine when the whole analysis has ended.
- Alphabetic
- By Inheritance
- ProgressManagement
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def isInterrupted(): Boolean
This method is called by the analysis method to check whether the analysis should be aborted.
This method is called by the analysis method to check whether the analysis should be aborted. The analysis will abort the computation if this method returns
true
. - abstract def progress(step: Int, event: ProgressEvent, message: Option[String]): Unit
This method is called by the analysis to report progress.
This method is called by the analysis to report progress.
An analysis is allowed to just report
End
events. However, if it reportsStart
events it must also reportEnd
events and it must use the same id to do so. This enables the correlation of the events. The analysis must never report more than oneStart
/End
event per step id.If the analysis is interrupted it may either signal (as the very last event) a
Killed
event or anEnd
event if the analysis completed normally.- step
The step/id of the event. The first event reported by the analysis has to use the number "1". The step id of the
Killed
event is "-1".- message
An optional message. Typically used in combination with
Start
events.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def end(step: Int, message: Option[String]): Unit
- final def end(step: Int, message: String): Unit
- final def end(step: Int): Unit
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def start(step: Int, message: String): Unit
- final def step[T](step: Int, startMessage: String)(f: => (T, Option[String])): T
A convenience method to execute one analysis step.
A convenience method to execute one analysis step. If executing the step takes longer you have to call
isInterrupted
to check the interrupt status. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated