All Downloads are FREE. Search and download functionalities are using the official Maven repository.

host.anzo.core.startup.Scheduled Maven / Gradle / Ivy

There is a newer version: 1.29
Show newest version
package host.anzo.core.startup;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

/**
 * @author ANZO
 * @since 8/19/2021
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Scheduled {
    /**
     * @return period between calls
     */
    long period();

    /**
     * @return period and delay time unit
     */
    TimeUnit timeUnit();

    /**
     * @return {@code true} if need call task after server start before general task schedule, {@code false} otherwise
     */
    boolean runAfterServerStart() default false;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy