|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.drools.util.concurrent.locks.Utils
public final class Utils
This class groups together the functionality of java.util.concurrent that cannot be fully and reliably implemented in backport, but for which some form of emulation is possible.
Currently, this class contains methods related to nanosecond-precision
timing, particularly via the nanoTime()
method. To measure time
accurately, this method by default uses java.sun.Perf
on
JDK1.4.2 and it falls back to System.currentTimeMillis
on earlier JDKs.
Method Summary | |
---|---|
static Object[] |
collectionToArray(Collection c)
|
static Object[] |
collectionToArray(Collection c,
Object[] a)
|
static long |
nanoTime()
Returns the current value of the most precise available system timer, in nanoseconds. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static long nanoTime()
Implementation note:By default, this method uses
sun.misc.Perf
on Java 1.4.2, and falls back to
System.currentTimeMillis() emulation on earlier JDKs. Custom
timer can be provided via the system property
edu.emory.mathcs.backport.java.util.concurrent.NanoTimerProvider
.
The value of the property should name a class implementing
NanoTimer
interface.
Note: on JDK 1.4.2, sun.misc.Perf
timer seems to have
resolution of the order of 1 microsecond, measured on Linux.
public static Object[] collectionToArray(Collection c)
public static Object[] collectionToArray(Collection c, Object[] a)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |