org.curjent.agent
Annotation Type Leading


@Documented
@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface Leading

Specifies that a call should finish executing before any subsequent calls start executing. The Leading annotation is useful for agents with two or more tasks, and therefore two or more threads of execution. See Marker for examples of restricting the order of execution for agents with multiple concurrently running tasks. Whereas a call to a method annotated with Marker (i.e., a trailing marker) starts executing after all prior calls have finished executing, a leading marker finishes executing before any subsequent calls start executing. Leading markers are useful, for example, for initialization, while trailing markers are useful for cleanup.

See Also:
Marker, Isolated



Copyright 2009-2011 Tom Landon
Apache License 2.0