public abstract class TimeoutUtils extends Object
| Constructor and Description |
|---|
TimeoutUtils() |
public static long toSeconds(long timeout,
TimeUnit unit)
Since a 0 timeout blocks some Redis ops indefinitely, this method will return 1 if the original value is greater than 0 but is truncated to 0 on conversion.
timeout - The timeout to convertunit - The timeout's unitpublic static long toMillis(long timeout,
TimeUnit unit)
Since a 0 timeout blocks some Redis ops indefinitely, this method will return 1 if the original value is greater than 0 but is truncated to 0 on conversion.
timeout - The timeout to convertunit - The timeout's unit