Package io.apigee.trireme.core

Examples of io.apigee.trireme.core.ClassCache


        }

        private static Script getCompiledScript(Context cx, String code, String fileName)
        {
            ScriptRunner runner = (ScriptRunner)cx.getThreadLocal(ScriptRunner.RUNNER);
            ClassCache cache = runner.getEnvironment().getClassCache();

            if (cache == null) {
                return compileScript(cx, code, fileName);
            }

            String cacheKey = makeCacheKey(code);
            Script compiled = cache.getCachedScript(cacheKey);
            if (compiled == null) {
                compiled = compileScript(cx, code, fileName);
                if (compiled != null) {
                    cache.putCachedScript(cacheKey, compiled);
                }
            }
            // Still may be null at this point...
            return compiled;
        }
View Full Code Here

TOP

Related Classes of io.apigee.trireme.core.ClassCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.