public interface Processor extends PropertiedObject, ContentContainerProvider
Modifier and Type | Method and Description |
---|---|
void |
flushCache()
Flushes the cache of this object.
|
java.lang.String |
getID()
Returns the ID of this object.
|
DataModel |
getInputDataModel()
Returns the
DataModel coming into this node. |
DataModel |
getOutputDataModel()
Returns the
DataModel output by this node. |
ProcessorDiagram |
getProcessorDiagram()
Returns the
ProcessorDiagram that owns this node. |
ProcessorStream |
getProcessorStream()
Returns the
ProcessorStream that owns this node. |
ProcessorType |
getProcessorType()
Returns the type of the node.
|
java.lang.String |
getTypeName()
Returns the name of this type of node.
|
int |
getXPosition()
Returns the x position offset of the node in the
ProcessorDiagram . |
int |
getYPosition()
Returns the y position offset of the node in the
ProcessorDiagram . |
boolean |
isCacheEnabled()
Returns
true if the cache is enabled, false otherwise. |
boolean |
isCacheFull()
Returns
true if the cache is full, false otherwise. |
boolean |
isInitial()
Returns
true if this is an initial node i.e. one that occurs at the start of a stream. |
boolean |
isInline()
Returns
true if this is an in-line node i.e. one that occurs mid-stream. |
boolean |
isTerminal()
Returns
true if this is a terminal node i.e. one that occurs at the end of a stream. |
ExecutionHandle |
run(java.util.Collection results)
Executes this node synchronously and waits for execution to complete.
|
ExecutionHandle |
runAction(java.lang.String action,
java.util.Map<java.lang.String,?> settings,
java.util.Collection results)
Executes the specified action against this node and waits for execution to complete.
|
void |
setCacheEnabled(boolean val)
Enables or disables the cache for this object.
|
void |
setName(java.lang.String name)
Sets the name for this node.
|
void |
setPositionBetween(Processor source,
Processor target)
Sets the position of the node in the
ProcessorDiagram so it is positioned
between the supplied nodes. |
void |
setXYPosition(int x,
int y)
Sets the position of the node in the
ProcessorDiagram . |
clearKeyedProperty, creationDate, getKeyedPropertyKeys, getKeyedPropertyValue, getLabel, getName, getPropertyType, getPropertyValue, getSavedByVersion, getStructuredPropertyDefinition, isKeyedProperty, isLocked, isProperty, isServerConnectionRequiredProperty, propertyIterator, setKeyedPropertyValue, setLabel, setPropertyValue, setPropertyValues, setPropertyValuesFrom, unlock
getContainerTagIterator, getContainerTags, getContainerTypeID, getContentContainer, getContentModel, getContentModelTags, putContentContainer
java.lang.String getID()
ProcessorType getProcessorType()
java.lang.String getTypeName()
boolean isInitial()
true
if this is an initial node i.e. one that occurs at the start of a stream.true
if this is an initial node, false
otherwiseisInline()
,
isTerminal()
boolean isInline()
true
if this is an in-line node i.e. one that occurs mid-stream.true
if this is an in-line node, false
otherwiseisInitial()
,
isTerminal()
boolean isTerminal()
true
if this is a terminal node i.e. one that occurs at the end of a stream.true
if this is a terminal node, false
otherwiseisInitial()
,
isInline()
void setCacheEnabled(boolean val)
val
- isCacheEnabled()
,
flushCache()
boolean isCacheEnabled()
true
if the cache is enabled, false
otherwise.true
if the cache is enabled, false
otherwisesetCacheEnabled(boolean)
,
flushCache()
boolean isCacheFull()
true
if the cache is full, false
otherwise.true
if the cache is full, false
otherwiseflushCache()
void flushCache()
setCacheEnabled(boolean)
,
isCacheEnabled()
DataModel getInputDataModel()
DataModel
coming into this node.
The result is the output data model of the first predecessor
or an empty data model if there are no predecessors.
This is a convenience function for the common case where a processor has at most one predecessor.
DataModel
coming into this nodeDataModel
DataModel getOutputDataModel()
DataModel
output by this node.DataModel
output by this nodeDataModel
ProcessorStream getProcessorStream()
ProcessorStream
that owns this node.ProcessorStream
that owns this nodeProcessorDiagram getProcessorDiagram()
ProcessorDiagram
that owns this node.ProcessorDiagram
that owns this nodeint getXPosition()
ProcessorDiagram
.int getYPosition()
ProcessorDiagram
.void setXYPosition(int x, int y)
ProcessorDiagram
.x
- the x offsety
- the y offsetvoid setPositionBetween(Processor source, Processor target)
ProcessorDiagram
so it is positioned
between the supplied nodes.source
- the predecessortarget
- the successorvoid setName(java.lang.String name)
name
- the new node nameExecutionHandle run(java.util.Collection results) throws OwnerException, ObjectLockedException, ServerConnectionException, SessionException
ExecutionHandle
which can be used to access the exit status and any
result from the task. Equivalent to calling:
getProcessorStream().runSelected(new Processor[] {this}, results);
results
- receives the result of a successful execution (if any)OwnerException
- if there is inconsistent ownershipObjectLockedException
- if the owner stream is locked for some reason (for example, it is already executing)ServerConnectionException
- if the connection to the server cannot be establishedSessionException
- if some other exception occursProcessorStream.runAll(Collection)
,
ProcessorStream.runSelected(Processor[], Collection)
ExecutionHandle runAction(java.lang.String action, java.util.Map<java.lang.String,?> settings, java.util.Collection results) throws OwnerException, ObjectLockedException, ServerConnectionException, SessionException
"preview"
that executes the stream up to (and including) this node
and returns a preview of the output in the form of a table.
The settings can be used to configure the action (although preview has no settings).
Returns an ExecutionHandle
which can be used to access the exit status and any
result from the task.action
- the action to perform on this nodesettings
- any parameters of the actionresults
- receives the results of a successful execution (if any)OwnerException
- if there is inconsistent ownershipObjectLockedException
- if the owner stream is locked for some reason (for example, it is already executing)ServerConnectionException
- if the connection to the server cannot be establishedSessionException
- if some other exception occurs(C) Copyright IBM Corp. 1994, 2015. All Rights Reserved.