patterntesting.runtime.monitor
Class ClasspathMonitor

Package class diagram package ClasspathMonitor
java.lang.Object
  extended by java.lang.Thread
      extended by patterntesting.runtime.monitor.ClasspathMonitor
All Implemented Interfaces:
Serializable, Runnable, ClasspathMonitorMBean

public final class ClasspathMonitor
extends Thread
implements ClasspathMonitorMBean

To avoid classpath problems like double entries of the same class or resource in the classpath there are several methods available.
To get the boot classpath the system property "sun.boot.class.path" is used to get them. This will work of course only for the SunVM.

Since:
10.02.2009
Version:
$Revision: 1.31 $
Author:
oliver
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
static void addAsShutdownHook()
          You can register the instance as shutdown hook.
 void addMeAsShutdownHook()
          To be able to register the instance as shutdown hook via JMX we can't use a static method - this is the reason why this additional method was added.
 void dumpMe()
          This operation dumps the different MBean attributes to a temporary file with the prefix "cpmon" (for ClasspathMonitor) and the extension ".txt".
 String[] getBootClasspath()
          To get the boot classpath the sytem property "sun.boot.class.path" is used to get them.
<T> Collection<Class<T>>
getClassList(String packageName, Class<T> type)
          Gets the classes of the given type.
 String getClassLoaderDetails()
          Dumps the internal fields of the classloader (after an idea from "Java ist auch eine Insel").
 String getClassloaderInfo()
          Returns some information about the classloader.
 String[] getClasspath()
          The classpath is stored in the system property "java.class.path".
 String[] getClasspathClasses()
          Scans the classpath for all classes.
 Collection<String> getClasspathClassList(String packageName)
          Gets the classes of a given package name as collection.
 Collection<Class<?>> getConcreteClassList(String packageName)
          Gets a list of concrete classes.
 URL getDoublet(Class<?> clazz, int nr)
          Gets the doublet.
 URL getDoublet(String name, int nr)
          Gets the doublet.
 String[] getDoubletClasspath()
          Gets the doublet classpath.
 List<Class<?>> getDoubletList()
          Gets the doublet list.
protected  List<Class<?>> getDoubletListParallel()
          This is an experiment: can we tune getDoubleList() by using thread techniques like consumer-/producer-pattern?
protected  List<Class<?>> getDoubletListSerial()
          Looks for each loaded class if it is a doublet or not.
 String[] getDoublets()
          Gets the doublets.
 URL getFirstDoublet(Class<?> clazz)
          Gets the first doublet.
 URL getFirstDoublet(String name)
          Gets the first doublet.
 String[] getIncompatibleClasses()
          Incompatible classes are doublets with different byte codes.
 List<Class<?>> getIncompatibleClassList()
          Looks for each doublet if it has a different doublets.
 String[] getIncompatibleClasspath()
          Gets the incompatible classpath.
static ClasspathMonitor getInstance()
          Yes, it is a Singleton because it offers only some services.
 String[] getLoadedClasses()
          As MBean a string array could be displayed by the 'jconsole'.
 String getLoadedClassesAsString()
          Gets the loaded classes as string.
 List<Class<?>> getLoadedClassList()
          Returns a list of classes which were loaded by the classloader.
 Package[] getLoadedPackageArray()
          This method is used by PatternTesting Samples (in packages.jsp).
 String[] getLoadedPackages()
          Gets the loaded packages.
 String getLoadedPackagesAsString()
          If you want to dump all packages you can use this method.
 String[] getManifestEntries(Class<?> clazz)
          If a MANIFEST is found for a given class the attributes in this file should be returned as a string array.
 String[] getManifestEntries(String classname)
          If a MANIFEST is found for a given class the attributes in this file should be returned as a string array.
 int getNoClasses(Class<?> cl)
          Gets the no classes.
 int getNoClasses(String classname)
          Get the number of different versions of the given class.
 int getNoResources(String name)
          Get number of resources.
static URL getResource(String name)
          Gets the resource.
 Enumeration<URL> getResources(String name)
          Gets the resources.
 Long getSerialVersionUID(Class<?> clazz)
          Gets the serial version uid.
 Long getSerialVersionUID(String classname)
           
 String[] getUnusedClasses()
          Unused classes are classes which are not loaded but which are found in the classpath.
 String[] getUnusedClasspath()
          The unused classpath is this path which are not used in past.
 String[] getUsedClasspath()
          It might be that the used classpath changes during the calculation of it.
 SortedSet<URI> getUsedClasspathSet()
          Gets the loaded classpath (without the bootclasspath) as sorted set.
 boolean isClassloaderSupported()
          Checks if is classloader supported.
 boolean isDoublet(Class<?> clazz)
          Is the given class a doublet, i.e. can it be found more than once in the classpath?
 boolean isDoublet(String name)
          Checks if is doublet.
 boolean isLoaded(String classname)
          Checks if the given classname is loaded.
 boolean isMultiThreadingEnabled()
          Is multi threading enabled?
static boolean isRegisteredAsMBean()
          If you want to ask JMX if bean is already registered you can ask the MBeanHelper or you can ask this method.
 boolean isShutdownHook()
          Here you can ask if the ClasspathMonitor was already registeres ad shutdown hook.
 void logMe()
          Logs the different array to the log output.
static void main(String[] args)
          This main method is only for testing the ClasspathMonitor together with the 'jconsole'.
static void registerAsMBean()
          Register as m bean.
static void removeAsShutdownHook()
          If you have registered the instance you can now de-register it.
 void removeMeAsShutdownHook()
          If you want to unregister the instance as shutdown hook you can use this (not static) method.
protected  void reset()
          Resets the doubletList and maybe later other things.
 void run()
          This method is called when the ClasspathMonitor is registered as shutdown hook.
 void setMultiThreadingEnabled(boolean enabled)
          Here you can enable or disable the (experimental) multi threading mode to see if it is really faster on a mult-core machine.
 String toString()
          We don't want to use the toString() implementation of the Thread class so we use our own one.
 URI whichClass(Class<?> clazz)
          Where is the given class found in the classpath?
 URI whichClass(String name)
          Which class.
 JarFile whichClassJar(Class<?> clazz)
          Which class jar.
 JarFile whichClassJar(String classname)
          Which class jar.
 URI whichClassPath(Class<?> clazz)
          Returns the jar file or path where the given class was found.
 URI whichClassPath(Package p)
          Which class path.
 URI whichClassPath(String classname)
          Returns the jar file or path where the given classname was found.
 URI whichResource(String name)
          Which resource.
 JarFile whichResourceJar(String resource)
          Which resource jar.
static JarFile whichResourceJar(URI resource)
          Which resource jar.
 URI whichResourcePath(String resource)
          Returns the jar file or path where the given resource was found.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

reset

protected void reset()
Resets the doubletList and maybe later other things. At the moment it is only used by ClasspathMonitorTest by the testGetDoubletListPerformance() method.


getInstance

public static ClasspathMonitor getInstance()
Yes, it is a Singleton because it offers only some services. So we don't need the object twice.

Returns:
the only instance

registerAsMBean

public static void registerAsMBean()
Register as m bean.


isRegisteredAsMBean

public static boolean isRegisteredAsMBean()
If you want to ask JMX if bean is already registered you can ask the MBeanHelper or you can ask this method.

Returns:
true if MBean is already registered.
Since:
1.0

whichResource

@Description(value="returns the URI of the given resource")
public URI whichResource(String name)
Which resource.

Specified by:
whichResource in interface ClasspathMonitorMBean
Parameters:
name - the name
Returns:
the URI
See Also:
ClasspathMonitorMBean.whichResource(String)

whichClass

public URI whichClass(String name)
Which class.

Specified by:
whichClass in interface ClasspathMonitorMBean
Parameters:
name - the name
Returns:
the URI
See Also:
ClasspathMonitorMBean.whichClass(java.lang.String)

whichClass

public URI whichClass(Class<?> clazz)
Where is the given class found in the classpath? Which class was loaded from which URI?.

Parameters:
clazz - the class
Returns:
file or jar path

whichClassPath

public URI whichClassPath(String classname)
Returns the jar file or path where the given classname was found.

Parameters:
classname - e.g. java.lang.String
Returns:
jar or path as URI

whichClassPath

public URI whichClassPath(Class<?> clazz)
Returns the jar file or path where the given class was found.

Parameters:
clazz - e.g. Sting.class
Returns:
jar or path as URI

whichClassPath

public URI whichClassPath(Package p)
Which class path.

Parameters:
p - the p
Returns:
the uRI

whichResourcePath

public URI whichResourcePath(String resource)
Returns the jar file or path where the given resource was found.

Parameters:
resource - e.g. log4j.properties
Returns:
jar or path as URI

whichClassJar

public JarFile whichClassJar(Class<?> clazz)
Which class jar.

Parameters:
clazz - the clazz
Returns:
the jar file

whichClassJar

public JarFile whichClassJar(String classname)
Which class jar.

Parameters:
classname - the classname
Returns:
the jar file

whichResourceJar

public JarFile whichResourceJar(String resource)
Which resource jar.

Parameters:
resource - the resource
Returns:
the jar file

whichResourceJar

public static JarFile whichResourceJar(URI resource)
Which resource jar.

Parameters:
resource - the resource
Returns:
the jar file

getResources

public Enumeration<URL> getResources(String name)
Gets the resources.

Parameters:
name - the name
Returns:
the resources

getResource

public static URL getResource(String name)
Gets the resource.

Parameters:
name - the name
Returns:
the resource

getNoResources

public int getNoResources(String name)
Description copied from interface: ClasspathMonitorMBean
Get number of resources.

Specified by:
getNoResources in interface ClasspathMonitorMBean
Parameters:
name - the name of the resource
Returns:
number of resources
See Also:
ClasspathMonitorMBean.getNoResources(java.lang.String)

getNoClasses

public int getNoClasses(Class<?> cl)
Gets the no classes.

Parameters:
cl - the cl
Returns:
the no classes

getNoClasses

public int getNoClasses(String classname)
Description copied from interface: ClasspathMonitorMBean
Get the number of different versions of the given class.

Specified by:
getNoClasses in interface ClasspathMonitorMBean
Parameters:
classname - the classname
Returns:
number of classes
See Also:
ClasspathMonitorMBean.getNoClasses(java.lang.String)

isDoublet

public boolean isDoublet(String name)
Checks if is doublet.

Specified by:
isDoublet in interface ClasspathMonitorMBean
Parameters:
name - the name
Returns:
true, if checks if is doublet
See Also:
ClasspathMonitorMBean.isDoublet(java.lang.String)

isDoublet

public boolean isDoublet(Class<?> clazz)
Is the given class a doublet, i.e. can it be found more than once in the classpath?

Parameters:
clazz - the class to be checked
Returns:
true if class is found more than once in the classpath

getFirstDoublet

public URL getFirstDoublet(String name)
Gets the first doublet.

Specified by:
getFirstDoublet in interface ClasspathMonitorMBean
Parameters:
name - the name
Returns:
the first doublet
See Also:
ClasspathMonitorMBean.getFirstDoublet(java.lang.String)

getFirstDoublet

public URL getFirstDoublet(Class<?> clazz)
Gets the first doublet.

Parameters:
clazz - the class
Returns:
the first doublet

getDoublet

public URL getDoublet(String name,
                      int nr)
Gets the doublet.

Specified by:
getDoublet in interface ClasspathMonitorMBean
Parameters:
name - the name
nr - the nr
Returns:
the doublet
See Also:
ClasspathMonitorMBean.getDoublet(java.lang.String, int)

getDoublet

public URL getDoublet(Class<?> clazz,
                      int nr)
Gets the doublet.

Parameters:
clazz - the clazz
nr - the nr
Returns:
the doublet

getDoubletList

public List<Class<?>> getDoubletList()
Gets the doublet list.

Returns:
the doublet list

getDoubletListSerial

protected List<Class<?>> getDoubletListSerial()
Looks for each loaded class if it is a doublet or not. For the performance reason it looks in the doubletList from the last time if it is already found. This is done because normally the number of doublets does not decrease.

Returns:
a sorted list of found doublets

getDoublets

public String[] getDoublets()
Gets the doublets.

Specified by:
getDoublets in interface ClasspathMonitorMBean
Returns:
the doublets
See Also:
ClasspathMonitorMBean.getDoublets()

getDoubletClasspath

public String[] getDoubletClasspath()
Gets the doublet classpath.

Specified by:
getDoubletClasspath in interface ClasspathMonitorMBean
Returns:
the doublet classpath
See Also:
ClasspathMonitorMBean.getDoubletClasspath()

getClassLoaderDetails

public String getClassLoaderDetails()
Dumps the internal fields of the classloader (after an idea from "Java ist auch eine Insel"). "http://www.galileocomputing.de/openbook/javainsel6/javainsel_21_003.htm#mj7e2d89f4b96fde1900bc09fd1db83fb1"

Returns:
the class loader details

isClassloaderSupported

public boolean isClassloaderSupported()
Checks if is classloader supported.

Specified by:
isClassloaderSupported in interface ClasspathMonitorMBean
Returns:
true if it is a known classloader

getClassloaderInfo

public String getClassloaderInfo()
Returns some information about the classloader. At least the user should be informed if it is a unknown classloader which is not supported or not tested.

Specified by:
getClassloaderInfo in interface ClasspathMonitorMBean
Returns:
e.g. "unknown classloader xxx - classpath can be wrong"

getLoadedPackages

public String[] getLoadedPackages()
Gets the loaded packages.

Specified by:
getLoadedPackages in interface ClasspathMonitorMBean
Returns:
the loaded packages
See Also:
ClasspathMonitorMBean.getLoadedPackages()

getLoadedPackageArray

public Package[] getLoadedPackageArray()
This method is used by PatternTesting Samples (in packages.jsp). So it is left here as wrapper around ClasspathDigger.

Returns:
array of packages

getLoadedPackagesAsString

public String getLoadedPackagesAsString()
If you want to dump all packages you can use this method. The output will be sorted.

Returns:
each package in a single line

getLoadedClassList

public List<Class<?>> getLoadedClassList()
Returns a list of classes which were loaded by the classloader.

Returns:
list of classes

getLoadedClasses

public String[] getLoadedClasses()
As MBean a string array could be displayed by the 'jconsole'. A class array not.

Specified by:
getLoadedClasses in interface ClasspathMonitorMBean
Returns:
the classes as sorted string array

getLoadedClassesAsString

public String getLoadedClassesAsString()
Gets the loaded classes as string.

Returns:
the loaded classes as string

isLoaded

public boolean isLoaded(String classname)
Checks if the given classname is loaded. Why does we use not Class as parameter here? If you would allow a parameter of type "Class" this class will be problably loaded before and this method will return always true!

Specified by:
isLoaded in interface ClasspathMonitorMBean
Parameters:
classname - name of the class
Returns:
true if class is loaded
See Also:
ClasspathMonitorMBean.isLoaded(java.lang.String)

getUnusedClasses

public String[] getUnusedClasses()
Unused classes are classes which are not loaded but which are found in the classpath.

Specified by:
getUnusedClasses in interface ClasspathMonitorMBean
Returns:
unused classes
See Also:
getLoadedClasses(), getClasspathClasses()

getClasspathClasses

public String[] getClasspathClasses()
Scans the classpath for all classes. For performance reason we return no longer a copy but the origin array. Don't do changes for the returned array!

Specified by:
getClasspathClasses in interface ClasspathMonitorMBean
Returns:
all classes as String array

getClasspathClassList

public Collection<String> getClasspathClassList(String packageName)
Gets the classes of a given package name as collection.

Parameters:
packageName - the package name
Returns:
the classpath class list

getClassList

public <T> Collection<Class<T>> getClassList(String packageName,
                                             Class<T> type)
Gets the classes of the given type.

Type Parameters:
T - the generic type
Parameters:
packageName - the package name
type - the type
Returns:
the classes

getConcreteClassList

public Collection<Class<?>> getConcreteClassList(String packageName)
Gets a list of concrete classes. These are classes which can be instantiated, i.e. they are not abstract and have a default constructor.

Parameters:
packageName - the package name
Returns:
the concrete class list

getUsedClasspathSet

public SortedSet<URI> getUsedClasspathSet()
Gets the loaded classpath (without the bootclasspath) as sorted set.
TODO: this method lets room for more performance (e.g. using a Hashtable for caching)

Returns:
the loaded classpath (excluding the bootclasspath)

getUsedClasspath

public String[] getUsedClasspath()
It might be that the used classpath changes during the calculation of it. So it is only a good approximation how it looks at the moment of the call.

Specified by:
getUsedClasspath in interface ClasspathMonitorMBean
Returns:
the used classpath
See Also:
getUsedClasspath()

getUnusedClasspath

public String[] getUnusedClasspath()
The unused classpath is this path which are not used in past.

Specified by:
getUnusedClasspath in interface ClasspathMonitorMBean
Returns:
the unused classpath (sorted)

getBootClasspath

public String[] getBootClasspath()
To get the boot classpath the sytem property "sun.boot.class.path" is used to get them. This will work of course only for the SunVM.

Specified by:
getBootClasspath in interface ClasspathMonitorMBean
Returns:
the boot classpath as String array

getClasspath

public String[] getClasspath()
The classpath is stored in the system property "java.class.path". And this is the classpath which will be returned.

Specified by:
getClasspath in interface ClasspathMonitorMBean
Returns:
the classpath as String array

getSerialVersionUID

public Long getSerialVersionUID(String classname)
                         throws IllegalAccessException
Specified by:
getSerialVersionUID in interface ClasspathMonitorMBean
Parameters:
classname - name of the class
Returns:
the serialVersionUID
Throws:
IllegalAccessException - if class can't be accessed
See Also:
ClasspathMonitorMBean.getSerialVersionUID(java.lang.String)

getSerialVersionUID

public Long getSerialVersionUID(Class<?> clazz)
                         throws IllegalAccessException
Gets the serial version uid.

Parameters:
clazz - the clazz
Returns:
the serial version uid
Throws:
IllegalAccessException - the illegal access exception

getManifestEntries

public String[] getManifestEntries(Class<?> clazz)
If a MANIFEST is found for a given class the attributes in this file should be returned as a string array. E.g. for commons-lang-2.3.jar the string array may looks like
 Manifest-Version: 1.0
 Ant-Version: Apache Ant 1.6.5
 Created-By: 1.3.1_09-85 ("Apple Computer, Inc.")
 Package: org.apache.commons.lang
 Extension-Name: commons-lang
 Specification-Version: 2.3
 Specification-Vendor: Apache Software Foundation
 Specification-Title: Commons Lang
 Implementation-Version: 2.3
 Implementation-Vendor: Apache Software Foundation
 Implementation-Title: Commons Lang
 Implementation-Vendor-Id: org.apache
 X-Compile-Source-JDK: 1.3
 X-Compile-Target-JDK: 1.1
 

Parameters:
clazz - the clazz
Returns:
the attribute entries of the Manifest (or emtpy array if no Manifest or no attributes are found)

getManifestEntries

public String[] getManifestEntries(String classname)
If a MANIFEST is found for a given class the attributes in this file should be returned as a string array. E.g. for commons-lang-2.3.jar the string array may looks like
 Manifest-Version: 1.0
 Ant-Version: Apache Ant 1.6.5
 Created-By: 1.3.1_09-85 ("Apple Computer, Inc.")
 Package: org.apache.commons.lang
 Extension-Name: commons-lang
 Specification-Version: 2.3
 Specification-Vendor: Apache Software Foundation
 Specification-Title: Commons Lang
 Implementation-Version: 2.3
 Implementation-Vendor: Apache Software Foundation
 Implementation-Title: Commons Lang
 Implementation-Vendor-Id: org.apache
 X-Compile-Source-JDK: 1.3
 X-Compile-Target-JDK: 1.1
 

Specified by:
getManifestEntries in interface ClasspathMonitorMBean
Parameters:
classname - (must be in the classpath, otherwise you'll get a IllegalArgumentException)
Returns:
the attribute entries of the Manifest (or emtpy array if no Manifest or no attributes are found)

getIncompatibleClassList

public List<Class<?>> getIncompatibleClassList()
Looks for each doublet if it has a different doublets. For the performance reason it looks in the incompatibleClassList from the last time if it is already found. This is done because normally the number of incompatible classed does not decrease.

Returns:
a sorted list of incompatible classes

getIncompatibleClasses

public String[] getIncompatibleClasses()
Incompatible classes are doublets with different byte codes.

Specified by:
getIncompatibleClasses in interface ClasspathMonitorMBean
Returns:
doublet classes with different byte codes.

getIncompatibleClasspath

public String[] getIncompatibleClasspath()
Gets the incompatible classpath.

Specified by:
getIncompatibleClasspath in interface ClasspathMonitorMBean
Returns:
the classpathes where incompatible classes were found

addAsShutdownHook

public static void addAsShutdownHook()
You can register the instance as shutdown hook. If the VM is terminated the attributes are logged and dumped to a text file in the tmp directory.

See Also:
logMe(), dumpMe(), addMeAsShutdownHook(), removeMeAsShutdownHook()

removeAsShutdownHook

public static void removeAsShutdownHook()
If you have registered the instance you can now de-register it.

Since:
1.0
See Also:
addAsShutdownHook(), removeMeAsShutdownHook()

addMeAsShutdownHook

public void addMeAsShutdownHook()
To be able to register the instance as shutdown hook via JMX we can't use a static method - this is the reason why this additional method was added.

Specified by:
addMeAsShutdownHook in interface ClasspathMonitorMBean
Since:
1.0
See Also:
addAsShutdownHook()

removeMeAsShutdownHook

public void removeMeAsShutdownHook()
If you want to unregister the instance as shutdown hook you can use this (not static) method.

Specified by:
removeMeAsShutdownHook in interface ClasspathMonitorMBean
Since:
1.0
See Also:
removeAsShutdownHook(), addMeAsShutdownHook()

isShutdownHook

public boolean isShutdownHook()
Here you can ask if the ClasspathMonitor was already registeres ad shutdown hook.

Specified by:
isShutdownHook in interface ClasspathMonitorMBean
Returns:
true if it is registered as shutdown hook.
Since:
1.0

run

public void run()
This method is called when the ClasspathMonitor is registered as shutdown hook.

Specified by:
run in interface Runnable
Overrides:
run in class Thread
See Also:
Thread.run()

logMe

public void logMe()
Logs the different array to the log output.

Specified by:
logMe in interface ClasspathMonitorMBean

dumpMe

public void dumpMe()
This operation dumps the different MBean attributes to a temporary file with the prefix "cpmon" (for ClasspathMonitor) and the extension ".txt".

Specified by:
dumpMe in interface ClasspathMonitorMBean

toString

public String toString()
We don't want to use the toString() implementation of the Thread class so we use our own one.

Overrides:
toString in class Thread
Returns:
the string
See Also:
Thread.toString()

main

public static void main(String[] args)
                 throws JMException
This main method is only for testing the ClasspathMonitor together with the 'jconsole'. On a Java5 VM start it with the following options: -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote

Parameters:
args - the args
Throws:
JMException - the JM exception

isMultiThreadingEnabled

public boolean isMultiThreadingEnabled()
Is multi threading enabled? Multi threading is automatically enabled if more than one processor is found. Otherwise you can use set the system property "multiThreadingEnabled=true" to activate it.

Specified by:
isMultiThreadingEnabled in interface ClasspathMonitorMBean
Returns:
true if multi threading is enabled for this class.
Since:
0.9.7

setMultiThreadingEnabled

public void setMultiThreadingEnabled(boolean enabled)
Here you can enable or disable the (experimental) multi threading mode to see if it is really faster on a mult-core machine.

Specified by:
setMultiThreadingEnabled in interface ClasspathMonitorMBean
Parameters:
enabled - the enabled
Since:
0.9.7

getDoubletListParallel

protected List<Class<?>> getDoubletListParallel()
This is an experiment: can we tune getDoubleList() by using thread techniques like consumer-/producer-pattern? Or is the synchronization overhead to big? Let's start and compare later.
Multi threading is automatically activated if property "multiThreadingEnabled" is set to true or if more than one available processor is found.

Returns:
a list of doublets
Since:
0.9.7


Copyright © 2002–2014 PatternTesting Team. All rights reserved.