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 voidPerforms the actual disposing work of this instance.org.apache.flink.api.java.ExecutionEnvironmentget()Provides theExecutionEnvironment.booleanOptional operation. Tell whether this instance has been disposed.Methods inherited from class org.apache.wayang.core.platform.ExecutionResourceTemplate
dispose, disposeUnreferencedMethods inherited from class org.apache.wayang.core.util.AbstractReferenceCountable
disposeIfUnreferenced, getNumReferences, noteDiscardedReference, noteObtainedReferenceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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- theExecutionEnvironmentto 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:ExecutionResourceTemplatePerforms the actual disposing work of this instance.- Specified by:
doDisposein classExecutionResourceTemplate- Throws:
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
-