Schedules a new timeout. @param task The task to execute when the timer times out. @param timeout_ms The timeout, in milliseconds (strictly positive).
(final TimerTask task, final long timeout_ms)
| 976 | * @param timeout_ms The timeout, in milliseconds (strictly positive). |
| 977 | */ |
| 978 | void newTimeout(final TimerTask task, final long timeout_ms) { |
| 979 | try { |
| 980 | timer.newTimeout(task, timeout_ms, MILLISECONDS); |
| 981 | } catch (IllegalStateException e) { |
| 982 | // This can happen if the timer fires just before shutdown() |
| 983 | // is called from another thread, and due to how threads get |
| 984 | // scheduled we tried to call newTimeout() after timer.stop(). |
| 985 | LOG.warn("Failed to schedule timer." |
| 986 | + " Ignore this if we're shutting down.", e); |
| 987 | } |
| 988 | } |
| 989 | |
| 990 | /** |
| 991 | * Returns the maximum time (in milliseconds) for which edits can be buffered. |
no outgoing calls
no test coverage detected