eu.larkc.core.parallelization
Interface MultiThreading

All Known Implementing Classes:
MultiThreadingImpl

public interface MultiThreading

This simple class can be used to create thread pools which allow an execution of multiple plug-in types or instances of the same plug-in type.

Author:
Matthias Assel

Field Summary
static MultiThreading INSTANCE
          Automates the creation of different multi-threading instances.
 
Method Summary
 SetOfStatements getSynchronizedResults()
          Allows for retrieving the synchronized results from all instances of the thread pool.
 void invokeThreadPool(java.util.HashMap<java.util.List<Plugin>,SetOfStatements> pluginList)
          Invokes a thread pool for a particular list of plug-ins.
 

Field Detail

INSTANCE

static final MultiThreading INSTANCE
Automates the creation of different multi-threading instances.

Method Detail

invokeThreadPool

void invokeThreadPool(java.util.HashMap<java.util.List<Plugin>,SetOfStatements> pluginList)
                      throws MultiThreadingException
Invokes a thread pool for a particular list of plug-ins. The method firstly creates a new thread pool based on the number of available cores or size of the list of plug-ins. Afterwards, the instantiated thread pool is executed.

Parameters:
pluginList -
Throws:
MultiThreadingException

getSynchronizedResults

SetOfStatements getSynchronizedResults()
                                       throws MultiThreadingException
Allows for retrieving the synchronized results from all instances of the thread pool.

Returns:
SetOfStatements
Throws:
MultiThreadingException