@Internal public class ClosureCleaner extends Object
| Constructor and Description |
|---|
ClosureCleaner() |
| Modifier and Type | Method and Description |
|---|---|
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 |
ensureSerializable(Object obj) |
public static void clean(Object func, boolean checkSerializable)
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 teh closure cleaning.public static void ensureSerializable(Object obj)
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.