Class ForceLogoutProvider.LogoutTimeCalculator
java.lang.Object
io.deephaven.enterprise.webclientdata2.ForceLogoutProvider.LogoutTimeCalculator
- Enclosing class:
- ForceLogoutProvider
Calculator class for computing and memoizing logout times.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateLogoutTime(@NotNull String id, @NotNull Instant updateTime, @NotNull String schedule, @Nullable String scheduleDate, @NotNull String time, @NotNull String timezone, byte days, @NotNull Instant currentTime, boolean returnNextOccurrence) Calculate logout time for a schedule with memoization.
-
Constructor Details
-
LogoutTimeCalculator
public LogoutTimeCalculator()
-
-
Method Details
-
calculateLogoutTime
public Instant calculateLogoutTime(@NotNull @NotNull String id, @NotNull @NotNull Instant updateTime, @NotNull @NotNull String schedule, @Nullable @Nullable String scheduleDate, @NotNull @NotNull String time, @NotNull @NotNull String timezone, byte days, @NotNull @NotNull Instant currentTime, boolean returnNextOccurrence) Calculate logout time for a schedule with memoization.- Parameters:
id- the schedule idupdateTime- the time the schedule was created/modifiedschedule- one of "Once", "Daily", "Weekly"scheduleDate- the date for "Once" scheduled logouts, null for otherstime- the time of day for the logouttimezone- the timezone for the scheduled timedays- for "Weekly", a bitfield where bit 0 = Sunday, bit 1 = Monday, etc.currentTime- the current timereturnNextOccurrence- if true, returns next occurrence (for display); if false, returns current occurrence (for triggering)- Returns:
- the logout Instant, or null if no valid logout time can be computed
-