public class SparkCompilerCleanupManager extends Object implements AutoCloseable
SparkCompiler
cleanup process. It tracks unclosed SparkCompiler
through
WeakReference
and perform cleanup on behalf.Constructor and Description |
---|
SparkCompilerCleanupManager() |
Modifier and Type | Method and Description |
---|---|
void |
addCompiler(SparkCompiler compiler,
Closeable closeable)
Adds a
SparkCompiler . |
void |
close()
Performs cleanup for all
SparkCompiler managed by this manager. |
void |
removeCompiler(SparkCompiler compiler)
Removes a
SparkCompiler with resource cleanup through the Closeable provided in
the addCompiler(SparkCompiler, Closeable) method. |
public void addCompiler(SparkCompiler compiler, Closeable closeable)
SparkCompiler
.compiler
- the compiler for cleanup managementcloseable
- the Closeable
for cleanuppublic void removeCompiler(SparkCompiler compiler)
SparkCompiler
with resource cleanup through the Closeable
provided in
the addCompiler(SparkCompiler, Closeable)
method.compiler
- the compiler to removepublic void close()
SparkCompiler
managed by this manager.close
in interface AutoCloseable
Copyright © 2018 Cask Data, Inc. Licensed under the Apache License, Version 2.0.