Class TensorChannel.Instance
- java.lang.Object
-
- org.apache.wayang.core.util.AbstractReferenceCountable
-
- org.apache.wayang.core.platform.ExecutionResourceTemplate
-
- org.apache.wayang.core.platform.AbstractChannelInstance
-
- org.apache.wayang.tensorflow.channels.TensorChannel.Instance
-
- All Implemented Interfaces:
ChannelInstance
,ExecutionResource
,ReferenceCountable
- Enclosing class:
- TensorChannel
public class TensorChannel.Instance extends AbstractChannelInstance
ChannelInstance
implementation forTensorChannel
s.
-
-
Constructor Summary
Constructors Constructor Description Instance(TensorflowExecutor executor, OptimizationContext.OperatorContext producerOperatorContext, int producerOutputIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(org.tensorflow.ndarray.NdArray<?> tensor)
protected void
doDispose()
Performs the actual disposing work of this instance.Channel
getChannel()
java.util.OptionalLong
getMeasuredCardinality()
Optionally provides the measured cardinality of this instance.<T extends org.tensorflow.ndarray.NdArray<?>>
TprovideTensor()
-
Methods inherited from class org.apache.wayang.core.platform.AbstractChannelInstance
getLineage, getProducerOperatorContext, markProduced, setMeasuredCardinality, toString, wasProduced
-
Methods inherited from class org.apache.wayang.core.platform.ExecutionResourceTemplate
dispose, disposeUnreferenced
-
Methods inherited from class org.apache.wayang.core.util.AbstractReferenceCountable
disposeIfUnreferenced, getNumReferences, isDisposed, noteDiscardedReference, noteObtainedReference
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.wayang.core.platform.ChannelInstance
isMarkedForInstrumentation
-
Methods inherited from interface org.apache.wayang.core.platform.ExecutionResource
dispose
-
Methods inherited from interface org.apache.wayang.core.util.ReferenceCountable
disposeIfUnreferenced, getNumReferences, isDisposed, noteDiscardedReference, noteObtainedReference
-
-
-
-
Constructor Detail
-
Instance
public Instance(TensorflowExecutor executor, OptimizationContext.OperatorContext producerOperatorContext, int producerOutputIndex)
-
-
Method Detail
-
accept
public void accept(org.tensorflow.ndarray.NdArray<?> tensor)
-
provideTensor
public <T extends org.tensorflow.ndarray.NdArray<?>> T provideTensor()
-
getMeasuredCardinality
public java.util.OptionalLong getMeasuredCardinality()
Description copied from interface:ChannelInstance
Optionally provides the measured cardinality of this instance. However, such a cardinality might not be available for several reasons. For instance, the measurement might not have been requested or could not be implemented by the executingPlatform
.- Specified by:
getMeasuredCardinality
in interfaceChannelInstance
- Overrides:
getMeasuredCardinality
in classAbstractChannelInstance
- Returns:
- the measured cardinality if available
-
doDispose
protected void doDispose() throws java.lang.Throwable
Description copied from class:ExecutionResourceTemplate
Performs the actual disposing work of this instance.- Specified by:
doDispose
in classExecutionResourceTemplate
- Throws:
java.lang.Throwable
- in case anything goes wrong
-
-