|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jgit.storage.dht.Timeout
public class Timeout
Length of time to wait for an operation before giving up.
Constructor Summary | |
---|---|
Timeout(long time,
java.util.concurrent.TimeUnit unit)
Construct a new timeout. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object other)
|
long |
getTime()
|
static Timeout |
getTimeout(Config cfg,
java.lang.String section,
java.lang.String subsection,
java.lang.String name,
Timeout defaultValue)
Obtain a timeout from the configuration. |
java.util.concurrent.TimeUnit |
getUnit()
|
int |
hashCode()
|
static Timeout |
milliseconds(int millis)
Construct a new timeout, expressed in milliseconds. |
static Timeout |
seconds(double sec)
Construct a new timeout, expressed in (possibly fractional) seconds. |
static Timeout |
seconds(int sec)
Construct a new timeout, expressed in seconds. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Timeout(long time, java.util.concurrent.TimeUnit unit)
time
- how long to wait.unit
- the unit that time
was expressed in.Method Detail |
---|
public static Timeout milliseconds(int millis)
millis
- number of milliseconds to wait.
public static Timeout seconds(int sec)
sec
- number of seconds to wait.
public static Timeout seconds(double sec)
sec
- number of seconds to wait.
public static Timeout getTimeout(Config cfg, java.lang.String section, java.lang.String subsection, java.lang.String name, Timeout defaultValue)
cfg
- configuration to read.section
- section key to read.subsection
- subsection to read, may be null.name
- variable to read.defaultValue
- default to return if no timeout is specified in the
configuration.
public long getTime()
getUnit()
s.public java.util.concurrent.TimeUnit getUnit()
getTime()
.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |