public class CodeCompiler extends Object
Constructor and Description |
---|
CodeCompiler(DrillConfig config,
OptionManager optionManager) |
Modifier and Type | Method and Description |
---|---|
void |
flushCache()
Flush the compiled classes from the cache.
|
<T> T |
getImplementationClass(CodeGenerator<?> cg) |
<T> List<T> |
getImplementationClass(CodeGenerator<?> cg,
int instanceNumber) |
public CodeCompiler(DrillConfig config, OptionManager optionManager)
public <T> T getImplementationClass(CodeGenerator<?> cg) throws ClassTransformationException, IOException
public <T> List<T> getImplementationClass(CodeGenerator<?> cg, int instanceNumber) throws ClassTransformationException, IOException
public void flushCache()
The cache has DrillbitContext lifetime, so the only way items go out of it now is by being aged out because of the maximum cache size.
The intent of flushCache() is to make it possible to flush the cache for testing purposes, although this could be used by users in case issues arise. If that happens, remove the visible for testing annotation.
Copyright © 2016 The Apache Software Foundation. All rights reserved.