ninja.scheduler
Annotation Type Schedule


@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface Schedule

Schedules the annotated method for execution


Optional Element Summary
 long delay
          The delay between executions.
 String delayProperty
          The property to read the delay from.
 long initialDelay
          The delay before it should first be run.
 String initialDelayProperty
          The property to read the initial delay from.
 TimeUnit timeUnit
          The time unit, defaults to milliseconds
 String timeUnitProperty
          The property to read the time unit from.
 

delay

public abstract long delay
The delay between executions. Is used as the default if no delay property is found.

Returns:
The delay between executions
Default:
-1L

delayProperty

public abstract String delayProperty
The property to read the delay from. If not specified, delay is used.

Returns:
The name of the property to read the delay from.
Default:
"_no-property"

timeUnit

public abstract TimeUnit timeUnit
The time unit, defaults to milliseconds

Returns:
The time unit
Default:
java.util.concurrent.TimeUnit.MILLISECONDS

timeUnitProperty

public abstract String timeUnitProperty
The property to read the time unit from. If not specified, timeUnit is used.

Returns:
The property to read the time unit from.
Default:
"_no-property"

initialDelay

public abstract long initialDelay
The delay before it should first be run. If negative, the delay is used as the initial delay.

Returns:
The delay
Default:
-1L

initialDelayProperty

public abstract String initialDelayProperty
The property to read the initial delay from. If not specified, initialDelay is used.

Returns:
The property to read the initial delay from.
Default:
"_no-property"


Copyright © 2012. All Rights Reserved.