Class SchedulerUtils
- java.lang.Object
-
- io.quarkus.scheduler.runtime.util.SchedulerUtils
-
public class SchedulerUtils extends Object
Utilities class for scheduler extensions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isConfigValue(String val)
static boolean
isOff(String value)
static String
lookUpPropertyValue(String propertyValue)
Looks up the property value by checking whether the value is a configuration key and resolves it if so.static long
parseDelayedAsMillis(Scheduled scheduled)
Parse the `@Scheduled(delayed = "")` field into milliseconds.static OptionalLong
parseEveryAsMillis(Scheduled scheduled)
Parse the `@Scheduled(every = "")` field into milliseconds.
-
-
-
Method Detail
-
parseDelayedAsMillis
public static long parseDelayedAsMillis(Scheduled scheduled)
Parse the `@Scheduled(delayed = "")` field into milliseconds.- Parameters:
scheduled
- annotation- Returns:
- returns the duration in milliseconds.
-
parseEveryAsMillis
public static OptionalLong parseEveryAsMillis(Scheduled scheduled)
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".
-
isOff
public static boolean isOff(String value)
-
lookUpPropertyValue
public static String lookUpPropertyValue(String propertyValue)
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
public static boolean isConfigValue(String val)
-
-