Class FlinkContextReference
- java.lang.Object
-
- org.apache.wayang.core.util.AbstractReferenceCountable
-
- org.apache.wayang.core.platform.ExecutionResourceTemplate
-
- org.apache.wayang.flink.execution.FlinkContextReference
-
- All Implemented Interfaces:
ExecutionResource,ReferenceCountable
public class FlinkContextReference extends ExecutionResourceTemplate
Wraps and manages a FlinkExecutionEnvironmentto avoid steady re-creation.
-
-
Constructor Summary
Constructors Constructor Description FlinkContextReference(CrossPlatformExecutor crossPlatformExecutor, org.apache.flink.api.java.ExecutionEnvironment flinkEnviroment, int parallelism)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoDispose()Performs the actual disposing work of this instance.org.apache.flink.api.java.ExecutionEnvironmentget()Provides theExecutionEnvironment.booleanisDisposed()Optional operation. Tell whether this instance has been disposed.-
Methods inherited from class org.apache.wayang.core.platform.ExecutionResourceTemplate
dispose, disposeUnreferenced
-
Methods inherited from class org.apache.wayang.core.util.AbstractReferenceCountable
disposeIfUnreferenced, getNumReferences, noteDiscardedReference, noteObtainedReference
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.wayang.core.util.ReferenceCountable
disposeIfUnreferenced, getNumReferences, noteDiscardedReference, noteObtainedReference
-
-
-
-
Constructor Detail
-
FlinkContextReference
public FlinkContextReference(CrossPlatformExecutor crossPlatformExecutor, org.apache.flink.api.java.ExecutionEnvironment flinkEnviroment, int parallelism)
Creates a new instance.- Parameters:
flinkEnviroment- theExecutionEnvironmentto be wrapped
-
-
Method Detail
-
get
public org.apache.flink.api.java.ExecutionEnvironment get()
Provides theExecutionEnvironment. This instance must not be disposed, yet.- Returns:
- the wrapped
ExecutionEnvironment
-
doDispose
protected void doDispose() throws java.lang.ThrowableDescription copied from class:ExecutionResourceTemplatePerforms the actual disposing work of this instance.- Specified by:
doDisposein classExecutionResourceTemplate- Throws:
java.lang.Throwable- in case anything goes wrong
-
isDisposed
public boolean isDisposed()
Description copied from interface:ReferenceCountableOptional operation. Tell whether this instance has been disposed.- Specified by:
isDisposedin interfaceReferenceCountable- Overrides:
isDisposedin classAbstractReferenceCountable- Returns:
- whether this instance has been disposed
-
-