org.elasticsearch.common.unit
Class TimeValue
java.lang.Object
org.elasticsearch.common.unit.TimeValue
- All Implemented Interfaces:
- java.io.Serializable, Streamable
public class TimeValue
- extends java.lang.Object
- implements java.io.Serializable, Streamable
- See Also:
- Serialized Form
Constructor Summary |
TimeValue(long millis)
|
TimeValue(long duration,
java.util.concurrent.TimeUnit timeUnit)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
TimeValue
public TimeValue(long millis)
TimeValue
public TimeValue(long duration,
java.util.concurrent.TimeUnit timeUnit)
timeValueMillis
public static TimeValue timeValueMillis(long millis)
timeValueSeconds
public static TimeValue timeValueSeconds(long seconds)
timeValueMinutes
public static TimeValue timeValueMinutes(long minutes)
timeValueHours
public static TimeValue timeValueHours(long hours)
nanos
public long nanos()
getNanos
public long getNanos()
micros
public long micros()
getMicros
public long getMicros()
millis
public long millis()
getMillis
public long getMillis()
seconds
public long seconds()
getSeconds
public long getSeconds()
minutes
public long minutes()
getMinutes
public long getMinutes()
hours
public long hours()
getHours
public long getHours()
days
public long days()
getDays
public long getDays()
microsFrac
public double microsFrac()
getMicrosFrac
public double getMicrosFrac()
millisFrac
public double millisFrac()
getMillisFrac
public double getMillisFrac()
secondsFrac
public double secondsFrac()
getSecondsFrac
public double getSecondsFrac()
minutesFrac
public double minutesFrac()
getMinutesFrac
public double getMinutesFrac()
hoursFrac
public double hoursFrac()
getHoursFrac
public double getHoursFrac()
daysFrac
public double daysFrac()
getDaysFrac
public double getDaysFrac()
format
public java.lang.String format()
format
public java.lang.String format(org.elasticsearch.common.joda.time.PeriodType type)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
parseTimeValue
public static TimeValue parseTimeValue(java.lang.String sValue,
TimeValue defaultValue)
readTimeValue
public static TimeValue readTimeValue(StreamInput in)
throws java.io.IOException
- Throws:
java.io.IOException
readFrom
public void readFrom(StreamInput in)
throws java.io.IOException
- Specified by:
readFrom
in interface Streamable
- Throws:
java.io.IOException
writeTo
public void writeTo(StreamOutput out)
throws java.io.IOException
- Specified by:
writeTo
in interface Streamable
- Throws:
java.io.IOException
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object