@Internal public class ClosureCleaner extends Object
| 构造器和说明 |
|---|
ClosureCleaner() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
clean(Object func,
boolean checkSerializable)
Tries to clean the closure of the given object, if the object is a non-static inner class.
|
static void |
clean(Object func,
org.apache.flink.api.common.ExecutionConfig.ClosureCleanerLevel level,
boolean checkSerializable)
Tries to clean the closure of the given object, if the object is a non-static inner
class.
|
static void |
ensureSerializable(Object obj) |
public static void clean(Object func, boolean checkSerializable)
ExecutionConfig.ClosureCleanerLevel#RECURSIVE.func - The object whose closure should be cleaned.checkSerializable - Flag to indicate whether serializability should be checked after
the closure cleaning attempt.org.apache.flink.api.common.InvalidProgramException - Thrown, if 'checkSerializable' is true, and the object was
not serializable after the closure cleaning.RuntimeException - A RuntimeException may be thrown, if the code of the class could
not be loaded, in order to process during the closure cleaning.public static void clean(Object func, org.apache.flink.api.common.ExecutionConfig.ClosureCleanerLevel level, boolean checkSerializable)
func - The object whose closure should be cleaned.level - the clean up level.checkSerializable - Flag to indicate whether serializability should be checked after
the closure cleaning attempt.org.apache.flink.api.common.InvalidProgramException - Thrown, if 'checkSerializable' is true, and the object was
not serializable after the closure cleaning.RuntimeException - A RuntimeException may be thrown, if the code of the class could not
be loaded, in order to process during the closure cleaning.public static void ensureSerializable(Object obj)
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.