T
- the model typepublic final class OpenMultiModelSource<T> extends CompositeOperator implements MultiSourceOperator<AbstractModelPort<T>>
CompositeOperator
.Constructor and Description |
---|
OpenMultiModelSource(LogicalPortFactory<? extends AbstractModelPort<T>> portFactory,
int numOutputs)
Create a model source for the given model port type.
|
Modifier and Type | Method and Description |
---|---|
<O extends LogicalOperator> |
add(O op)
Add a LogicalOperator to this graph, using the short class name as the name
of the operator.
|
<O extends LogicalOperator> |
add(O op,
OperatorSettings settings)
Add a LogicalOperator to this graph, specifying advanced operator settings.
|
<O extends LogicalOperator> |
add(O op,
String name)
Add a LogicalOperator to this graph, specifying a name of the operator.
|
protected void |
compose(CompositionContext ctx)
This implementation of compose adds any operators were added to this
to the provided composition context and creates any connections that
were added to this in the provided composition context.
|
void |
connect(LogicalPort from,
LogicalPort to)
Connect two ports together.
|
void |
connectOutput(AbstractModelPort<T> from,
int index) |
int |
getNumOutputs()
Returns the number of input ports
|
List<AbstractModelPort<T>> |
getOutputs()
Returns the output ports
|
Object |
getProperty(GraphPath path)
Returns a property of the given path.
|
Object |
getProperty(String path)
Returns a property of the given path.
|
void |
setProperty(GraphPath path,
Object value)
Sets a property of the given path.
|
void |
setProperty(String path,
Object value)
Sets a property of the given path.
|
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disableParallelism, getInputPorts, getOutputPorts
public OpenMultiModelSource(LogicalPortFactory<? extends AbstractModelPort<T>> portFactory, int numOutputs)
add
and connect
.portFactory
- the factory for the model port, determines the port typenumOutputs
- the number of output portspublic List<AbstractModelPort<T>> getOutputs()
MultiSourceOperator
getOutputs
in interface MultiSourceOperator<AbstractModelPort<T>>
public int getNumOutputs()
public void connectOutput(AbstractModelPort<T> from, int index)
protected final void compose(CompositionContext ctx)
compose
in class CompositeOperator
ctx
- the contextpublic final <O extends LogicalOperator> O add(O op)
OperatorComposable
add
in interface OperatorComposable
O
- the type of the operator.op
- the operator to add to the graph.public final <O extends LogicalOperator> O add(O op, String name)
OperatorComposable
add
in interface OperatorComposable
O
- the type of the operator.op
- the operator to add to the graph.name
- the name of the the operatorpublic final <O extends LogicalOperator> O add(O op, OperatorSettings settings)
OperatorComposable
add
in interface OperatorComposable
O
- the type of the operator.op
- the operator to add to the graph.settings
- operators settings, contains name and other configuration options.public final void connect(LogicalPort from, LogicalPort to)
OperatorComposable
CompositeOperator
to an input port of an operator that was added to this context. (Applies to CompositeOperator.compose(com.pervasive.datarush.operators.CompositionContext)
).CompositeOperator
. (Applies to CompositeOperator.compose(com.pervasive.datarush.operators.CompositionContext)
).Note on port types: connecting mixed type ports will generally fail when the graph is compiled.
Note that ports do not store connection information; rather, connection information is stored externally within this context.
connect
in interface OperatorComposable
from
- the source portto
- the target portpublic final Object getProperty(GraphPath path)
PropertyValued
getProperty
in interface PropertyValued
path
- the path to the property.public final void setProperty(GraphPath path, Object value)
PropertyValued
setProperty
in interface PropertyValued
path
- the path to the property.value
- the new value of the propertypublic final Object getProperty(String path)
PropertyValued
getProperty
in interface PropertyValued
path
- the path to the property.public final void setProperty(String path, Object value)
PropertyValued
setProperty
in interface PropertyValued
path
- the path to the property.value
- the new value of the propertyCopyright © 2020 Actian Corporation. All rights reserved.