org.knime.core.node.util
Class NodeExecutionJobManagerPool

java.lang.Object
  extended by org.knime.core.node.util.NodeExecutionJobManagerPool

public final class NodeExecutionJobManagerPool
extends Object

Collects all registered JobManager extensions and holds an instance of each in a set.

Author:
ohl, University of Konstanz

Method Summary
static Collection<String> getAllJobManagerFactoryIDs()
          Returns names of all registered NodeExecutionJobManagerFactorys.
static NodeExecutionJobManagerFactory getDefaultJobManagerFactory()
          There is always at least one job manager factory availably.
static NodeExecutionJobManagerFactory getJobManagerFactory(String id)
          Returns the job manager factory with the specified id - or null if it doesn't exists.
static int getNumberOfJobManagersFactories()
          Returns the number of job manager factories registered through the extension point.
static NodeExecutionJobManager load(NodeExecutionJobManager instance, NodeSettingsRO ncSettings)
          Updates the settings of the passed job manager - if the settings specify the same type of job manager - or creates and returns a new instance of that new type of job manager.
static NodeExecutionJobManager load(NodeSettingsRO sncSettings)
          Restores a job manager given the parameters contained in the argument settings.
static void saveJobManager(NodeExecutionJobManager jobManager, NodeSettingsWO settings)
          Saves the argument job manager to a settings object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getJobManagerFactory

public static NodeExecutionJobManagerFactory getJobManagerFactory(String id)
Returns the job manager factory with the specified id - or null if it doesn't exists. If the job manager factory is provided by an extension (plug-in) that is currently not installed this returns null, even though in another KNIME installation it may not.

Parameters:
id - the id of the job manager factory to return
Returns:
the job manager factory with the specified id, or null if there is none.

saveJobManager

public static void saveJobManager(NodeExecutionJobManager jobManager,
                                  NodeSettingsWO settings)
Saves the argument job manager to a settings object.

Parameters:
jobManager - The job manager to save.
settings - To save to.

load

public static NodeExecutionJobManager load(NodeSettingsRO sncSettings)
                                    throws InvalidSettingsException
Restores a job manager given the parameters contained in the argument settings.

Parameters:
sncSettings - To load from.
Returns:
A customized job manager or the default one if no settings were stored.
Throws:
InvalidSettingsException - If that fails.

load

public static NodeExecutionJobManager load(NodeExecutionJobManager instance,
                                           NodeSettingsRO ncSettings)
                                    throws InvalidSettingsException
Updates the settings of the passed job manager - if the settings specify the same type of job manager - or creates and returns a new instance of that new type of job manager.

Parameters:
instance - the "old" job manager that will be updated if its type fits the type in the settings, or null to create a new instance.
ncSettings - the new settings to apply
Returns:
either the specified instance with new settings, or a new instance of a new type with the new settings.
Throws:
InvalidSettingsException - if the settings are invalid

getDefaultJobManagerFactory

public static NodeExecutionJobManagerFactory getDefaultJobManagerFactory()
There is always at least one job manager factory availably.

Returns:
the default job manager

getNumberOfJobManagersFactories

public static int getNumberOfJobManagersFactories()
Returns the number of job manager factories registered through the extension point. A call to this method may trigger instantiation of all job manager factories.

Returns:
the number of registered job manager factories

getAllJobManagerFactoryIDs

public static Collection<String> getAllJobManagerFactoryIDs()
Returns names of all registered NodeExecutionJobManagerFactorys. If this method is called for the first time it starts instantiating all job manager factories.

Returns:
names of all registered NodeExecutionJobManagerFactorys


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.