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
Wraps and manages a Flink
ExecutionEnvironment
to avoid steady re-creation.-
Constructor Summary
ConstructorsConstructorDescriptionFlinkContextReference
(CrossPlatformExecutor crossPlatformExecutor, org.apache.flink.api.java.ExecutionEnvironment flinkEnviroment, int parallelism) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Performs the actual disposing work of this instance.org.apache.flink.api.java.ExecutionEnvironment
get()
Provides theExecutionEnvironment
.boolean
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 Details
-
FlinkContextReference
public FlinkContextReference(CrossPlatformExecutor crossPlatformExecutor, org.apache.flink.api.java.ExecutionEnvironment flinkEnviroment, int parallelism) Creates a new instance.- Parameters:
flinkEnviroment
- theExecutionEnvironment
to be wrapped
-
-
Method Details
-
get
public org.apache.flink.api.java.ExecutionEnvironment get()Provides theExecutionEnvironment
. This instance must not be disposed, yet.- Returns:
- the wrapped
ExecutionEnvironment
-
doDispose
Description copied from class:ExecutionResourceTemplate
Performs the actual disposing work of this instance.- Specified by:
doDispose
in classExecutionResourceTemplate
- Throws:
Throwable
- in case anything goes wrong
-
isDisposed
public boolean isDisposed()Description copied from interface:ReferenceCountable
Optional operation. Tell whether this instance has been disposed.- Specified by:
isDisposed
in interfaceReferenceCountable
- Overrides:
isDisposed
in classAbstractReferenceCountable
- Returns:
- whether this instance has been disposed
-