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
ChannelInstanceimplementation forFileChannels.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedInstance(OptimizationContext.OperatorContext producerOperatorContext, int producerOutputIndex)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringaddGivenOrTempPath(java.lang.String pathOrNull, Configuration configuration)voidaddPath(java.lang.String path)voiddoDispose()Performs the actual disposing work of this instance.FileChannelgetChannel()java.util.Collection<java.lang.String>getPaths()java.lang.StringgetSinglePath()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
Channelthat 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 WayangExceptionDescription copied from class:ExecutionResourceTemplatePerforms the actual disposing work of this instance.- Specified by:
doDisposein classExecutionResourceTemplate- Throws:
WayangException
-
-