Class SchedulerUtils
java.lang.Object
io.quarkus.scheduler.common.runtime.util.SchedulerUtils
Utilities class for scheduler extensions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TinstantiateBeanOrClass(Class<T> type) static booleanisConfigValue(String val) static booleanstatic StringlookUpPropertyValue(String propertyValue) Looks up the property value by checking whether the value is a configuration key and resolves it if so.static ZoneIdparseCronTimeZone(io.quarkus.scheduler.Scheduled scheduled) static longparseDelayedAsMillis(io.quarkus.scheduler.Scheduled scheduled) Parse the `@Scheduled(delayed = "")` field into milliseconds.static OptionalLongparseEveryAsMillis(io.quarkus.scheduler.Scheduled scheduled) Parse the `@Scheduled(every = "")` field into milliseconds.static OptionalLongparseExecutionMaxDelayAsMillis(io.quarkus.scheduler.Scheduled scheduled) Parse the `@Scheduled(executionMaxDelay = "")` value into milliseconds.static DurationparseOverdueGracePeriod(io.quarkus.scheduler.Scheduled scheduled, Duration defaultDuration) Parse the `@Scheduled(overdueGracePeriod = "")` field into milliseconds.
-
Method Details
-
parseDelayedAsMillis
public static long parseDelayedAsMillis(io.quarkus.scheduler.Scheduled scheduled) Parse the `@Scheduled(delayed = "")` field into milliseconds.- Parameters:
scheduled- annotation- Returns:
- returns the duration in milliseconds.
-
parseEveryAsMillis
Parse the `@Scheduled(every = "")` field into milliseconds.- Parameters:
scheduled- annotation- Returns:
- returns the duration in milliseconds or
OptionalLong.empty()if the expression evaluates to "off" or "disabled".
-
parseExecutionMaxDelayAsMillis
Parse the `@Scheduled(executionMaxDelay = "")` value into milliseconds.- Parameters:
scheduled- annotation- Returns:
- returns the duration in milliseconds or
OptionalLong.empty()if the expression evaluates to "off" or "disabled".
-
parseOverdueGracePeriod
public static Duration parseOverdueGracePeriod(io.quarkus.scheduler.Scheduled scheduled, Duration defaultDuration) Parse the `@Scheduled(overdueGracePeriod = "")` field into milliseconds.- Parameters:
scheduled- annotation- Returns:
- returns the duration.
-
isOff
-
lookUpPropertyValue
Looks up the property value by checking whether the value is a configuration key and resolves it if so.- Parameters:
propertyValue- property value to look up.- Returns:
- the resolved property value.
-
isConfigValue
-
parseCronTimeZone
-
instantiateBeanOrClass
-