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.
- 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
- All
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
Endevents. However, if it reportsStartevents it must also reportEndevents 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/Endevent per step id.If the analysis is interrupted it may either signal (as the very last event) a
Killedevent or anEndevent 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
Killedevent is "-1".- message
An optional message. Typically used in combination with
Startevents.
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- 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: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- 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
isInterruptedto check the interrupt status. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )