Package org.apache.wayang.basic.channels
Class FileChannel.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.basic.channels.FileChannel.Instance
-
- All Implemented Interfaces:
ChannelInstance
,ExecutionResource
,ReferenceCountable
- Enclosing class:
- FileChannel
public class FileChannel.Instance extends AbstractChannelInstance
ChannelInstance
implementation forFileChannel
s.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Instance(OptimizationContext.OperatorContext producerOperatorContext, int producerOutputIndex)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
addGivenOrTempPath(java.lang.String pathOrNull, Configuration configuration)
void
addPath(java.lang.String path)
void
doDispose()
Performs the actual disposing work of this instance.FileChannel
getChannel()
java.util.Collection<java.lang.String>
getPaths()
java.lang.String
getSinglePath()
If there is only a single element ongetPaths()
, retrieves it.-
Methods inherited from class org.apache.wayang.core.platform.AbstractChannelInstance
getLineage, getMeasuredCardinality, 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
protected Instance(OptimizationContext.OperatorContext producerOperatorContext, int producerOutputIndex)
Creates a new instance.- Parameters:
producerOperatorContext
-producerOutputIndex
-
-
-
Method Detail
-
getChannel
public FileChannel getChannel()
- Returns:
- the
Channel
that is implemented by this instance
-
addPath
public void addPath(java.lang.String path)
-
addGivenOrTempPath
public java.lang.String addGivenOrTempPath(java.lang.String pathOrNull, Configuration configuration)
-
getPaths
public java.util.Collection<java.lang.String> getPaths()
-
getSinglePath
public java.lang.String getSinglePath()
If there is only a single element ongetPaths()
, retrieves it. Otherwise, fails.- Returns:
- the single element from
getPaths()
-
doDispose
public void doDispose() throws WayangException
Description copied from class:ExecutionResourceTemplate
Performs the actual disposing work of this instance.- Specified by:
doDispose
in classExecutionResourceTemplate
- Throws:
WayangException
-
-