|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.utilint.PropUtil
public class PropUtil
Convenience methods for handling JE properties.
Constructor Summary | |
---|---|
PropUtil()
|
Method Summary | |
---|---|
static int |
durationToMillis(long val,
TimeUnit unit)
Converts the given duration (interval value plus unit) to milliseconds, ensuring that any given value greater than zero converts to at least one millisecond to avoid a zero millisecond result, since Object.wait(0) waits forever. |
static String |
formatDuration(long time,
TimeUnit unit)
Formats a String duration property (time + optional unit). |
static long |
millisToDuration(int val,
TimeUnit unit)
Converts the given duration value in milliseconds to the given unit. |
static int |
parseDuration(String property)
Parses a String duration property (time + optional unit) and returns the value in millis. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropUtil()
Method Detail |
---|
public static int durationToMillis(long val, TimeUnit unit)
IllegalArgumentException
- if the duration argument is illegal.
Thrown via API setter methods such as Transaction.setLockTimeout.public static long millisToDuration(int val, TimeUnit unit)
IllegalArgumentException
- if the unit is null. Thrown via API
getter methods such as Transaction.getLockTimeout.public static int parseDuration(String property)
IllegalArgumentException
- if the duration string is illegal.
Thrown via the Enviornment ctor and setMutableConfig, and likewise for a
ReplicatedEnvironment.public static String formatDuration(long time, TimeUnit unit)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |