| Modifier and Type | Field and Description | 
|---|---|
| static Timeout | DISABLEDA disabled timeout represented as 0  MILLISECONDS. | 
| static Timeout | ONE_MILLISECONDA one milliseconds  Timeout. | 
| static Timeout | ZERO_MILLISECONDSA zero milliseconds  Timeout. | 
MAX_VALUE, NEG_ONE_MILLISECOND, NEG_ONE_SECOND| Modifier and Type | Method and Description | 
|---|---|
| static Timeout | defaultsToDisabled(Timeout timeout) | 
| boolean | isDisabled()Whether this timeout is disabled. | 
| boolean | isEnabled()Whether this timeout is enabled. | 
| static Timeout | of(long duration,
  TimeUnit timeUnit)Creates a Timeout. | 
| static Timeout | ofDays(long days)Creates a Timeout. | 
| static Timeout | ofHours(long hours)Creates a Timeout. | 
| static Timeout | ofMicroseconds(long microseconds)Creates a Timeout. | 
| static Timeout | ofMilliseconds(long milliseconds)Creates a Timeout. | 
| static Timeout | ofMinutes(long minutes)Creates a Timeout. | 
| static Timeout | ofNanoseconds(long nanoseconds)Creates a Timeout. | 
| static Timeout | ofSeconds(long seconds)Creates a Timeout. | 
| static Timeout | parse(String value)Parses a Timeout in the format  <Integer><SPACE><TimeUnit>, for example"1,200 MILLISECONDS" | 
asBoundInt, compareTo, convert, defaultsTo, defaultsToNegativeOneMillisecond, defaultsToNegativeOneSecond, defaultsToZeroMilliseconds, divide, divide, equals, getDuration, getTimeUnit, hashCode, isNonNegative, isPositive, min, sleep, timedJoin, timedWait, toDays, toHours, toMicroseconds, toMilliseconds, toMillisecondsIntBound, toMinutes, toNanoseconds, toSeconds, toSecondsIntBound, toString, toTimeoutpublic static final Timeout DISABLED
MILLISECONDS.public static Timeout defaultsToDisabled(Timeout timeout)
timeout - may be nulltimeValue or DISABLEDpublic static Timeout of(long duration, TimeUnit timeUnit)
duration - the time duration in the given timeUnit.timeUnit - the time unit for the given duration.public static Timeout ofDays(long days)
days - the duration in days and the given timeUnit.public static Timeout ofHours(long hours)
hours - the duration in hours and the given timeUnit.public static Timeout ofMicroseconds(long microseconds)
microseconds - the duration in seconds and the given timeUnit.public static Timeout ofMilliseconds(long milliseconds)
milliseconds - the duration in milliseconds and the given timeUnit.public static Timeout ofMinutes(long minutes)
minutes - the duration in minutes and the given timeUnit.public static Timeout ofNanoseconds(long nanoseconds)
nanoseconds - the duration in seconds and the given timeUnit.public static Timeout ofSeconds(long seconds)
seconds - the duration in seconds and the given timeUnit.public static Timeout parse(String value) throws ParseException
<Integer><SPACE><TimeUnit>, for example "1,200 MILLISECONDS"value - the TimeValue to parseParseException - if the number cannot be parsedpublic boolean isDisabled()
public boolean isEnabled()
Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.