Class WaitEnd
java.lang.Object
com.iizix.server.user.WaitEnd
When a lock or a wait of the sign-in ends, as text for the log (CC-FIX-LOCK-LOG-DURATIONS): the remaining time in words and the end as a date-time, e.g. "in 26 minutes and 59 seconds at 2026-11-16 15:40:53 UTC". Until this order the log lines of a refused attempt printed the remaining time as a count of milliseconds ("1727633 milliseconds remain") and never said when the lock ends.
Both parts come from one reading of the clock, and both are cut to the whole second, so that the time of the log line plus the duration is the date-time printed. The duration is written by Utilities.formatEnglishDuration(long); under one second it is the milliseconds that remain ("in 400 milliseconds at ..."). The date-time is always UTC, whatever the time zone of the server: the mails about a lock (FailedSignInMails) name the same end in UTC, rounded up to the minute.
- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptionstatic Stringat(long until) Describes the end of a lock alone, for the lines written when a lock STARTS: they say its length themselves, so the remaining time would say it twice (CC-FIX-LOCK-PATHS-AND-RESET, LG-D-4).static Stringdescribe(long until, long now) Describes when a lock or a wait ends.static StringdescribeRemaining(long remain) Describes when a wait ends of which only the remaining time is known, as the per-source throttle (SourceThrottle.heldBack(String)) answers it: the clock is read once, here.
Method Details
describe
Describes when a lock or a wait ends.- Parameters:
until- The end in milliseconds since the epoch:AccountHold.until(int,long)for a lock, the last failure plus the wait for a wait of the back-off.now- The current time in milliseconds since the epoch, the one the caller decided with.- Returns:
- E.g. "in 26 minutes and 59 seconds at 2026-11-16 15:40:53 UTC".
describeRemaining
Describes when a wait ends of which only the remaining time is known, as the per-source throttle (SourceThrottle.heldBack(String)) answers it: the clock is read once, here.- Parameters:
remain- The remaining milliseconds.- Returns:
- E.g. "in 14 minutes and 3 seconds at 2026-11-16 15:40:53 UTC".
at
Describes the end of a lock alone, for the lines written when a lock STARTS: they say its length themselves, so the remaining time would say it twice (CC-FIX-LOCK-PATHS-AND-RESET, LG-D-4).- Parameters:
until- The end in milliseconds since the epoch:AccountHold.until(int,long).- Returns:
- E.g. "at 2026-11-16 15:40:53 UTC".