|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.core.node.workflow.NodeContainer
org.knime.core.node.workflow.SingleNodeContainer
public final class SingleNodeContainer
Holds a node in addition to some status information.
| Nested Class Summary | |
|---|---|
static class |
SingleNodeContainer.LoopStatus
|
static class |
SingleNodeContainer.MemoryPolicy
Available policy how to handle output data. |
static class |
SingleNodeContainer.SingleNodeContainerSettings
Handles the settings specific to a SingleNodeContainer. |
| Nested classes/interfaces inherited from class org.knime.core.node.workflow.NodeContainer |
|---|
NodeContainer.NodeContainerSettings, NodeContainer.State |
| Field Summary | |
|---|---|
(package private) static String |
CFG_MEMORY_POLICY
Config key: What memory policy to use for a node outport. |
static String |
DROP_DIR_NAME
Name of the sub-directory containing node-local files. |
| Fields inherited from class org.knime.core.node.workflow.NodeContainer |
|---|
m_nodeMutex |
| Constructor Summary | |
|---|---|
SingleNodeContainer(WorkflowManager parent,
NodeID id,
SingleNodeContainerPersistor persistor)
Create new SingleNodeContainer from persistor. |
|
SingleNodeContainer(WorkflowManager parent,
Node n,
NodeID id)
Create new SingleNodeContainer based on existing Node. |
|
| Method Summary | |
|---|---|
boolean |
areDialogAndNodeSettingsEqual()
|
(package private) boolean |
areSettingsValid(NodeSettingsRO settings)
|
(package private) void |
cancelExecution()
Cancel execution of a marked, queued, or executing node. |
(package private) boolean |
canPerformReset()
|
(package private) void |
cleanOutPorts()
Cleans outports, i.e. |
(package private) void |
cleanup()
Method that's called when the node is discarded. |
(package private) boolean |
configure(PortObjectSpec[] inObjectSpecs)
Configure underlying node and update state accordingly. |
ExecutionContext |
createExecutionContext()
|
SingleNodeContainerExecutionResult |
createExecutionResult(ExecutionMonitor exec)
Saves all internals that are necessary to mimic the computed result into a new execution result object. |
FlowObjectStack |
createOutFlowObjectStack()
Creates a copy of the stack held by the Node and modifies the copy by pushing all outgoing flow variables onto it. |
protected NodeContainerPersistor |
getCopyPersistor(HashMap<Integer,ContainerTable> tableRep,
boolean preserveDeletableFlags,
boolean isUndoableDeleteCommand)
Get a new persistor that is used to copy this node (copy&paste action). |
(package private) NodeDialogPane |
getDialogPane()
|
(package private) NodeDialogPane |
getDialogPaneWithSettings(PortObjectSpec[] inSpecs)
|
(package private) FlowObjectStack |
getFlowObjectStack()
|
URL |
getIcon()
|
NodeInPort |
getInPort(int index)
Return a port, which for the inputs really only holds the type and some other static information. |
BufferedDataTable[] |
getInternalHeldTables()
Get the tables that are kept by the underlying node. |
Node.LoopRole |
getLoopRole()
|
SingleNodeContainer.LoopStatus |
getLoopStatus()
|
String |
getName()
|
Node |
getNode()
Get the underlying node. |
NodeModel |
getNodeModel()
|
Node |
getNodeReferenceBug2136()
Deprecated. Method is going to be removed in future versions. Use getNode() instead.
Currently used to enable workaround for bug #2136 (see also bug #2137) |
AbstractNodeView<NodeModel> |
getNodeView(int i)
Return the view with the specified index provided by the node. |
String |
getNodeViewName(int i)
|
int |
getNrInPorts()
|
int |
getNrNodeViews()
Returns the number of views provided by the node implementation. |
int |
getNrOutPorts()
|
(package private) SingleNodeContainer.MemoryPolicy |
getOutDataMemoryPolicy()
Get the policy for the data outports, that is, keep the output in main memory or write it to disc. |
FlowObjectStack |
getOutgoingFlowObjectStack()
Delegates to node to get flow variables they are added or modified by the node. |
NodeOutPort |
getOutPort(int index)
Returns the output port for the given portID. |
(package private) SingleNodeContainer.SingleNodeContainerSettings |
getSingleNodeContainerSettings()
|
NodeFactory.NodeType |
getType()
|
Element |
getXMLDescription()
|
boolean |
hasDialog()
|
boolean |
isInactive()
|
boolean |
isInactiveBranchConsumer()
|
protected boolean |
isLocalWFM()
Is this node a to be locally executed workflow. |
(package private) boolean |
isResetable()
check if node can be safely reset. |
(package private) WorkflowCopyContent |
loadContent(NodeContainerPersistor nodePersistor,
Map<Integer,BufferedDataTable> tblRep,
FlowObjectStack inStack,
ExecutionMonitor exec,
WorkflowPersistor.LoadResult loadResult,
boolean preserveNodeMessage)
Restore content from persistor. |
void |
loadExecutionResult(NodeContainerExecutionResult execResult,
ExecutionMonitor exec,
WorkflowPersistor.LoadResult loadResult)
Load information from execution result. |
(package private) void |
loadSettings(NodeSettingsRO settings)
|
(package private) void |
loadSNCSettings(NodeSettingsRO settings)
Loads the SingleNodeContainer settings from the argument. |
(package private) void |
markForExecution(boolean flag)
Enable (or disable) queuing of underlying node for execution. |
(package private) void |
markForReExecutionInLoop()
Mark underlying, executed node so that it can be re-executed (= update state accordingly). |
(package private) void |
mimicRemoteExecuted(NodeContainerExecutionStatus status)
Put this node into either the NodeContainer.State.EXECUTED or
NodeContainer.State.IDLE state depending on the argument. |
(package private) void |
mimicRemoteExecuting()
Marks this node as remotely executing. |
(package private) void |
mimicRemotePostExecute()
Puts this node (and all its children) into the NodeContainer.State.POSTEXECUTE
state. |
(package private) void |
mimicRemotePreExecute()
Puts this node (and all its children) into the NodeContainer.State.PREEXECUTE
state. |
(package private) void |
pauseLoopExecution(boolean enablePausing)
enable (or disable) that after the next execution of this loop end node the execution will be halted. |
NodeContainerExecutionStatus |
performExecuteNode(PortObject[] inObjects)
Execute underlying Node asynchronously. |
(package private) void |
performShutdown()
Called when the workflow is to be disposed. |
(package private) void |
performStateTransitionEXECUTED(NodeContainerExecutionStatus status)
This should be used to change the nodes states correctly (and likely needs to be synchronized with other changes visible to successors of this node as well!) AFTER the actual execution. |
(package private) void |
performStateTransitionEXECUTING()
This should be used to change the nodes states correctly (and likely needs to be synchronized with other changes visible to successors of this node as well!) BEFORE the actual execution. |
(package private) void |
performStateTransitionPOSTEXECUTE()
Called when the state of a node should switch from NodeContainer.State.EXECUTING (or NodeContainer.State.EXECUTINGREMOTELY) to
NodeContainer.State.POSTEXECUTE. |
(package private) boolean |
performStateTransitionPREEXECUTE()
Called when the state of a node should switch from NodeContainer.State.QUEUED to NodeContainer.State.PREEXECUTE. |
(package private) void |
reset()
Reset underlying node and update state accordingly. |
(package private) boolean |
resetAndConfigureLoopBody()
|
(package private) void |
saveSettings(NodeSettingsWO settings)
|
(package private) void |
saveSNCSettings(NodeSettingsWO settings)
Saves the SingleNodeContainer settings such as the job executor to the argument node settings object. |
(package private) void |
setCredentialsStore(CredentialsStore store)
Set credentials store on this node. |
void |
setDirty()
Overridden to also ensure that outport tables are "open" (node directory is deleted upon save() - so the tables are better copied into temp). |
(package private) void |
setFlowObjectStack(FlowObjectStack st,
FlowObjectStack outgoingStack)
Set FlowObjectStack. |
(package private) void |
setInHiLiteHandler(int index,
HiLiteHandler hdl)
Set a new HiLiteHandler for an incoming connection. |
(package private) void |
setJobManager(NodeExecutionJobManager je)
Set a new NodeExecutionJobManager for this node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String DROP_DIR_NAME
static final String CFG_MEMORY_POLICY
| Constructor Detail |
|---|
SingleNodeContainer(WorkflowManager parent,
Node n,
NodeID id)
parent - the workflow manager holding this noden - the underlying nodeid - the unique identifier
SingleNodeContainer(WorkflowManager parent,
NodeID id,
SingleNodeContainerPersistor persistor)
parent - the workflow manager holding this nodeid - the identifierpersistor - to read from| Method Detail |
|---|
public Node getNode()
@Deprecated public Node getNodeReferenceBug2136()
getNode() instead.
Currently used to enable workaround for bug #2136 (see also bug #2137)
public NodeModel getNodeModel()
public int getNrOutPorts()
getNrOutPorts in class NodeContainerpublic int getNrInPorts()
getNrInPorts in class NodeContainerpublic NodeOutPort getOutPort(int index)
portID. This port
is essentially a container for the underlying Node and the index and will
retrieve all interesting data from the Node.
getOutPort in class NodeContainerindex - The output port's ID.
IndexOutOfBoundsException - If the index is out of range.public NodeInPort getInPort(int index)
getInPort in class NodeContainerindex - the index of the input port
final SingleNodeContainer.MemoryPolicy getOutDataMemoryPolicy()
void setInHiLiteHandler(int index,
HiLiteHandler hdl)
index - index of porthdl - new HiLiteHandlerpublic AbstractNodeView<NodeModel> getNodeView(int i)
getNodeView in class NodeContaineri - the view to create
public String getNodeViewName(int i)
getNodeViewName in class NodeContainerpublic int getNrNodeViews()
getNrNodeViews in class NodeContainervoid cleanup()
cleanup in class NodeContainervoid setJobManager(NodeExecutionJobManager je)
setJobManager in class NodeContainerje - the new job manager.public ExecutionContext createExecutionContext()
boolean configure(PortObjectSpec[] inObjectSpecs)
inObjectSpecs - input table specifications
IllegalStateException - in case of illegal entry state.boolean isResetable()
isResetable in class NodeContainerboolean canPerformReset()
canPerformReset in class NodeContainervoid reset()
IllegalStateException - in case of illegal entry state.void cleanOutPorts()
void markForExecution(boolean flag)
markForExecution in class NodeContainerflag - determines if node is marked or unmarked for execution
IllegalStateException - in case of illegal entry state.void markForReExecutionInLoop()
IllegalStateException - in case of illegal entry state.void cancelExecution()
cancelExecution in class NodeContainervoid performShutdown()
performShutdown in class NodeContainervoid mimicRemotePreExecute()
NodeContainer.State.PREEXECUTE
state. This method is used when a workflow is executed remotely.
mimicRemotePreExecute in class NodeContainervoid mimicRemoteExecuting()
mimicRemoteExecuting in class NodeContainervoid mimicRemotePostExecute()
NodeContainer.State.POSTEXECUTE
state. This method is used when a workflow is executed remotely.
mimicRemotePostExecute in class NodeContainervoid mimicRemoteExecuted(NodeContainerExecutionStatus status)
NodeContainer.State.EXECUTED or
NodeContainer.State.IDLE state depending on the argument. This method is
applied recursively on all of this node's children (if a meta node).
mimicRemoteExecuted in class NodeContainerstatus - Where to get the success flag from.boolean performStateTransitionPREEXECUTE()
NodeContainer.State.QUEUED to NodeContainer.State.PREEXECUTE. The method is to be
called from the node's parent in a synchronized environment.
performStateTransitionPREEXECUTE in class NodeContainervoid performStateTransitionEXECUTING()
performStateTransitionEXECUTING in class NodeContainervoid performStateTransitionPOSTEXECUTE()
NodeContainer.State.EXECUTING (or NodeContainer.State.EXECUTINGREMOTELY) to
NodeContainer.State.POSTEXECUTE. The method is to be called from the node's
parent in a synchronized environment.
performStateTransitionPOSTEXECUTE in class NodeContainervoid performStateTransitionEXECUTED(NodeContainerExecutionStatus status)
performStateTransitionEXECUTED in class NodeContainerstatus - indicates if execution was successfulpublic NodeContainerExecutionStatus performExecuteNode(PortObject[] inObjects)
inObjects - input data
IllegalStateException - in case of illegal entry state.
void loadSettings(NodeSettingsRO settings)
throws InvalidSettingsException
loadSettings in class NodeContainerInvalidSettingsException
WorkflowCopyContent loadContent(NodeContainerPersistor nodePersistor,
Map<Integer,BufferedDataTable> tblRep,
FlowObjectStack inStack,
ExecutionMonitor exec,
WorkflowPersistor.LoadResult loadResult,
boolean preserveNodeMessage)
throws CanceledExecutionException
loadContent in class NodeContainernodePersistor - To load from.tblRep - A table repository to restore BufferedDatTablesinStack - Incoming FlowObjectStack.exec - For progressloadResult - Where to report errors/warnings topreserveNodeMessage - Whether possible node messages in the
persistor are to be preserved (parameter to configure method
that is called during load).
CanceledExecutionException - If canceled.
public void loadExecutionResult(NodeContainerExecutionResult execResult,
ExecutionMonitor exec,
WorkflowPersistor.LoadResult loadResult)
super.loadEx....
loadExecutionResult in class NodeContainerexecResult - The execution result (contains port objects, messages, etc)exec - For progress information (no cancelation supported)loadResult - A load result that contains, e.g. error messages.
public SingleNodeContainerExecutionResult createExecutionResult(ExecutionMonitor exec)
throws CanceledExecutionException
#loadExecutionResult(NodeContainerExecutionResult, ExecutionMonitor, LoadResult)
is called).
createExecutionResult in class NodeContainerexec - For progress information (this method will copy port
objects).
CanceledExecutionException - If canceled.void saveSettings(NodeSettingsWO settings)
saveSettings in class NodeContainervoid saveSNCSettings(NodeSettingsWO settings)
settings - To save to.loadSNCSettings(NodeSettingsRO)
void loadSNCSettings(NodeSettingsRO settings)
throws InvalidSettingsException
saveSNCSettings(NodeSettingsWO).
settings - To load from.
InvalidSettingsException - If settings are invalid.SingleNodeContainer.SingleNodeContainerSettings getSingleNodeContainerSettings()
boolean areSettingsValid(NodeSettingsRO settings)
areSettingsValid in class NodeContainervoid setCredentialsStore(CredentialsStore store)
Credentials) and set a new provider on the underlying node, which
has this node as client.
store - The new store to set.
NullPointerException - If the argument is null.Node.setCredentialsProvider(CredentialsProvider)
void setFlowObjectStack(FlowObjectStack st,
FlowObjectStack outgoingStack)
FlowObjectStack.
st - new stackoutgoingStack - a node-local stack containing the items that
were pushed by the node (this stack will be empty unless this
node is a loop start node)FlowObjectStack getFlowObjectStack()
public FlowObjectStack getOutgoingFlowObjectStack()
Node.getOutgoingFlowObjectStack()public FlowObjectStack createOutFlowObjectStack()
public Node.LoopRole getLoopRole()
boolean resetAndConfigureLoopBody()
NodeModel.resetAndConfigureLoopBody()void pauseLoopExecution(boolean enablePausing)
if - true, pause is enabled. Otherwise disabled.public String getName()
getName in class NodeContainerpublic boolean hasDialog()
hasDialog in class NodeContainer
NodeDialogPane getDialogPaneWithSettings(PortObjectSpec[] inSpecs)
throws NotConfigurableException
getDialogPaneWithSettings in class NodeContainerNotConfigurableExceptionNodeDialogPane getDialogPane()
getDialogPane in class NodeContainerpublic boolean areDialogAndNodeSettingsEqual()
areDialogAndNodeSettingsEqual in class NodeContainerpublic BufferedDataTable[] getInternalHeldTables()
BufferedDataTableHolder or (b) the node
is not executed.
BufferedDataTableHolder,
Node.getInternalHeldTables()public NodeFactory.NodeType getType()
getType in class NodeContainerpublic URL getIcon()
getIcon in class NodeContainerpublic boolean isInactive()
Node.isInactive()public boolean isInactiveBranchConsumer()
true if the underlying node is able to consume
inactive objects (implements
InactiveBranchConsumer).Node#isInactiveBranchConsumer()}public SingleNodeContainer.LoopStatus getLoopStatus()
public Element getXMLDescription()
protected boolean isLocalWFM()
This method returns false for all single node container.
isLocalWFM in class NodeContainerpublic void setDirty()
setDirty in class NodeContainer
protected NodeContainerPersistor getCopyPersistor(HashMap<Integer,ContainerTable> tableRep,
boolean preserveDeletableFlags,
boolean isUndoableDeleteCommand)
getCopyPersistor in class NodeContainertableRep - Table repository of the destination.preserveDeletableFlags - Whether the "isdeleteable" annotation
should be copied also (false when individual nodes are copied
but true when an entire meta node is copied).isUndoableDeleteCommand - If to keep the location of the
node directories (important for undo of delete commands, see
WorkflowManager.copy(boolean, WorkflowCopyContent)
for details.)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||