com.sleepycat.je.utilint
Class PropUtil
java.lang.Object
com.sleepycat.je.utilint.PropUtil
public class PropUtil
- extends Object
Convenience methods for handling JE properties.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropUtil
public PropUtil()
getBoolean
public static boolean getBoolean(Properties props,
String propName)
- Returns:
- true if the property is set to "true".
validateProps
public static Properties validateProps(Properties props,
Set allowedProps,
String apiMethod)
throws DatabaseException
- Validate properties in the property bag. If null was passed, return an
empty property object, else return the original property object.
- Throws:
DatabaseException
- if the property bag contains
a property not specified in the set of allowed properties.
validateProp
public static void validateProp(String propName,
Set allowedProps,
String apiMethod)
throws DatabaseException
- Throws:
DatabaseException
- if the property is not valid.
microsToMillis
public static long microsToMillis(long micros)
- Convert microseconds to milliseconds, ensuring that any microsecond
value greater than zero converts to at least one millisecond to avoid a
zero millisecond result since Object.wait(0) waits forever.
Copyright 2004-2005 Sleepycat, Inc. All Rights Reserved.