|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.data.redis.core.TimeoutUtils
public abstract class TimeoutUtils
Helper class featuring methods for calculating Redis timeouts
| Constructor Summary | |
|---|---|
TimeoutUtils()
|
|
| Method Summary | |
|---|---|
static long |
toMillis(long timeout,
TimeUnit unit)
Converts the given timeout to milliseconds. |
static long |
toSeconds(long timeout,
TimeUnit unit)
Converts the given timeout to seconds. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimeoutUtils()
| Method Detail |
|---|
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 unit
public 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||