org.knime.core.node.exec
Class LocalNodeExecutionJob

java.lang.Object
  extended by org.knime.core.node.workflow.NodeExecutionJob
      extended by org.knime.core.node.exec.LocalNodeExecutionJob
All Implemented Interfaces:
Runnable

public class LocalNodeExecutionJob
extends NodeExecutionJob

A locally executed node job. It can only execute SingleNodeContainer.

Author:
Bernd Wiswedel, University of Konstanz

Constructor Summary
LocalNodeExecutionJob(SingleNodeContainer snc, PortObject[] data)
          Creates new local job.
 
Method Summary
 boolean cancel()
          Called when the execution is to be canceled.
 boolean isReConnecting()
          Whether this job has been disconnected (from a cluster execution, e.g.) and is now resuming the execution.
 NodeContainerExecutionStatus mainExecute()
          Called when the main execution takes place.
(package private)  void setFuture(Future<?> future)
          Set the future that represents the pending execution.
 
Methods inherited from class org.knime.core.node.workflow.NodeExecutionJob
afterExecute, beforeExecute, getNodeContainer, getPortObjects, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalNodeExecutionJob

public LocalNodeExecutionJob(SingleNodeContainer snc,
                             PortObject[] data)
Creates new local job.

Parameters:
snc - The node container to execute.
data - Its input port object.
Method Detail

cancel

public boolean cancel()
Called when the execution is to be canceled.

Specified by:
cancel in class NodeExecutionJob
Returns:
Whether the cancelation was successful.
See Also:
Future.cancel(boolean)

setFuture

void setFuture(Future<?> future)
Set the future that represents the pending execution.

Parameters:
future - the future to set

mainExecute

public NodeContainerExecutionStatus mainExecute()
Called when the main execution takes place. The node will be in the appropriate state (NodeContainer.State.EXECUTING or NodeContainer.State.EXECUTINGREMOTELY when this method is called.

Specified by:
mainExecute in class NodeExecutionJob
Returns:
Whether the execution was successful.

isReConnecting

public boolean isReConnecting()
Whether this job has been disconnected (from a cluster execution, e.g.) and is now resuming the execution. If so, the execution procedure will skip the execution setup. This property will be false for locally executed nodes.

Specified by:
isReConnecting in class NodeExecutionJob
Returns:
The above described property.


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.