|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.node.exec.ThreadNodeExecutionJobManager
public class ThreadNodeExecutionJobManager
Field Summary | |
---|---|
static ThreadNodeExecutionJobManager |
INSTANCE
|
Constructor Summary | |
---|---|
ThreadNodeExecutionJobManager()
|
|
ThreadNodeExecutionJobManager(ThreadPool pool)
|
Method Summary | |
---|---|
boolean |
canDisconnect(NodeExecutionJob job)
Returns true, if a executing job continues running even after closing the workflow - and if this manager can reconnect to this job after re-opening the workflow again. |
boolean |
canSaveInternals()
|
void |
closeAllViews()
Close all open views. |
PortObjectSpec[] |
configure(PortObjectSpec[] inSpecs,
PortObjectSpec[] nodeModelOutSpecs)
In case the executor modifies the result of the underlying node it can create the appropriate output specs. |
void |
disconnect(NodeExecutionJob job)
Disconnects the running job. |
URL |
getIcon()
|
String |
getID()
Returns a unique ID of this job manager implementations. |
NodeExecutionJobManagerPanel |
getSettingsPanelComponent(NodeContainer.NodeContainerSettings.SplitType nodeSplitType)
Creates a new instance of a panel that holds components to display the job manager's settings and to allow the user to enter new values. |
NodeView<NodeModel> |
getView(NodeContainer nc)
Return a new instance of a node view for the job of the provided node. |
String |
getViewName(NodeContainer nc)
Creates a title for the corresponding view. |
boolean |
hasView()
Returns true if this job manager provides a view. |
void |
load(NodeSettingsRO settings)
Restores the properties of the specific job manager. |
NodeExecutionJob |
loadFromReconnectSettings(NodeSettingsRO settings,
PortObject[] inports,
NodeContainer snc)
Read the information previously stored in the settings object and restore an executing job. |
void |
loadInternals(ReferencedFile directory)
Restore the internals from a directory. |
void |
resetAllViews()
Called when the underlying node is reset. |
void |
save(NodeSettingsWO settings)
Saves parameters that customize this instance. |
void |
saveInternals(ReferencedFile directory)
Save the internals of this instance to the target directory. |
void |
saveReconnectSettings(NodeExecutionJob job,
NodeSettingsWO settings)
Saves all the information necessary to reconnect to the specified job after it is disconnected. |
NodeExecutionJob |
submitJob(NodeContainer nc,
PortObject[] data)
Executes the given node container with this job manager. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ThreadNodeExecutionJobManager INSTANCE
Constructor Detail |
---|
public ThreadNodeExecutionJobManager()
public ThreadNodeExecutionJobManager(ThreadPool pool)
Method Detail |
---|
public NodeExecutionJob submitJob(NodeContainer nc, PortObject[] data)
submitJob
in interface NodeExecutionJobManager
nc
- The node to execute (may be a single node container or a meta
node)data
- The input data for that node.
public String getID()
NodeExecutionJobManager.toString()
getID
in interface NodeExecutionJobManager
public NodeExecutionJobManagerPanel getSettingsPanelComponent(NodeContainer.NodeContainerSettings.SplitType nodeSplitType)
getSettingsPanelComponent
in interface NodeExecutionJobManager
nodeSplitType
- type of splitting permitted by the underlying node
public String toString()
toString
in interface NodeExecutionJobManager
toString
in class Object
public boolean canDisconnect(NodeExecutionJob job)
canDisconnect
in interface NodeExecutionJobManager
job
- to check for dis/reconnect ability
public NodeExecutionJob loadFromReconnectSettings(NodeSettingsRO settings, PortObject[] inports, NodeContainer snc) throws InvalidSettingsException, NodeExecutionJobReconnectException
loadFromReconnectSettings
in interface NodeExecutionJobManager
settings
- reconnect information stored during
NodeExecutionJobManager.saveReconnectSettings(NodeExecutionJob, NodeSettingsWO)
inports
- port objects that were provided at execution start time.snc
- Node whose remote executing is to be continued.
InvalidSettingsException
- if the information in the settings
object is invalid
NodeExecutionJobReconnectException
- if reconnect failed.NodeExecutionJobManager.saveReconnectSettings(NodeExecutionJob, NodeSettingsWO)
public void disconnect(NodeExecutionJob job)
disconnect
in interface NodeExecutionJobManager
job
- The job to cancel.public void saveReconnectSettings(NodeExecutionJob job, NodeSettingsWO settings)
saveReconnectSettings
in interface NodeExecutionJobManager
job
- the job that is disconnected and must be restored later.settings
- stores the information in hereNodeExecutionJobManager.loadFromReconnectSettings( NodeSettingsRO, PortObject[],
NodeContainer)
public void save(NodeSettingsWO settings)
save
in interface NodeExecutionJobManager
settings
- to save to.public void load(NodeSettingsRO settings) throws InvalidSettingsException
NodeExecutionJobManager.save(NodeSettingsWO)
.
load
in interface NodeExecutionJobManager
settings
- To load from.
InvalidSettingsException
- If that fails.public PortObjectSpec[] configure(PortObjectSpec[] inSpecs, PortObjectSpec[] nodeModelOutSpecs)
nodeModelOutSpecs
.
configure
in interface NodeExecutionJobManager
inSpecs
- port object specs from predecessor node(s)nodeModelOutSpecs
- the output specs created by the underlying node
public URL getIcon()
getIcon
in interface NodeExecutionJobManager
public boolean hasView()
hasView
in interface NodeExecutionJobManager
public NodeView<NodeModel> getView(NodeContainer nc)
getView
in interface NodeExecutionJobManager
nc
- the corresponding node container
public String getViewName(NodeContainer nc)
getViewName
in interface NodeExecutionJobManager
nc
- the corresponding node container.
public void resetAllViews()
resetAllViews
in interface NodeExecutionJobManager
public void closeAllViews()
closeAllViews
in interface NodeExecutionJobManager
public boolean canSaveInternals()
canSaveInternals
in interface NodeExecutionJobManager
NodeExecutionJobManager.saveInternals(ReferencedFile)
public void loadInternals(ReferencedFile directory) throws IOException
NodeExecutionJobManager.saveInternals(ReferencedFile)
. Implementations should consider
to keep a pointer to the referenced file and load the internals on demand
(in order to speed up the load routines).
loadInternals
in interface NodeExecutionJobManager
directory
- To load from.
IOException
- If that fails for any reason.public void saveInternals(ReferencedFile directory) throws IOException
NodeExecutionJobManager.canSaveInternals()
returns true.
saveInternals
in interface NodeExecutionJobManager
directory
- To save to (guaranteed to be empty)
IOException
- If that fails for any reason.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |