Run Interface Reference

List of all members.

Detailed Description

Marks a method of a TeslaComponent or TeslaReaderComponent as executable during the run-phase. Note that such a method must not require any parameters, and that it must return a Result indicating the success of processing (typically, Result#CANCELLED or Result#ERROR(String)).

Please also note that Run#stage() and Run#joinOnExit() are experimental options which are currently not interpreted - a component must contain exactly one method annotated with .

sschwieb, jhermes

Public Methods

int stage () default 0
boolean joinOnExit () default true

Package Functions

ThreadMode threadMode () default ThreadMode.NOT_SUPPORTED

Method Details

boolean joinOnExit ( )

This value might be useful if a method is executed multi-threaded and other Run-annotated methods will be executed later on. In such a case, the overall execution speed can be increased by setting this value to false (default is true). If following methods require that preceding methods are all terminated, the value must be true.

int stage ( )

If two or more methods are annotated with Run, the execution order can be defined by setting this value. Method a will be executed after method b if the stage of a is larger than the stage of b. If the stage is equal, the methods will be executed at the same time. Default value is 0.

ThreadMode threadMode ( ) [package]