/** * Clears the internal cache. */ public void clear() { synchronized (classMapCache) { classMapCache.clear(); classNameCache.clear(); log.debug(CACHEDUMP_MSG); } }
/** * Clears the internal cache. */ public void clear() { synchronized (classMapCache) { classMapCache.clear(); classNameCache.clear(); log.debug(CACHEDUMP_MSG); } }
/** * @deprecated Use getLog() and call debug() on it. * @see Log#debug(Object) * @param message The message to log. */ public void debug(Object message) { getLog().debug(message); }
/** * @param message * @deprecated Use getLog() and call warn() on it. */ public void debug(Object message) { getLog().debug(message); }
/** * @deprecated Use getLog() and call debug() on it. * @see Log#debug(Object) * @param message The message to log. */ public static void debug(Object message) { getLog().debug( message ); }
/** * @deprecated Use getLog() and call debug() on it. * @see Log#debug(Object) * @param message The message to log. */ public static void debug(Object message) { getLog().debug( message ); }
/** * @param message * @deprecated Use getLog() and call warn() on it. */ public void debug(Object message) { getLog().debug(message); }
/** * @deprecated Use getLog() and call debug() on it. * @see Log#debug(Object) * @param message The message to log. */ public void debug(Object message) { getLog().debug(message); }
/** * @deprecated Use getLog() and call debug() on it. * @see Log#debug(Object) * @param message The message to log. */ public static void debug(Object message) { getLog().debug(message); }
/** * @deprecated Use getLog() and call debug() on it. * @see Log#debug(Object) * @param message The message to log. */ public static void debug(Object message) { getLog().debug(message); }
/** * Standard constructor * @param clazz The class for which this ClassMap gets constructed. */ public ClassMap(final Class clazz, final Log log) { this.clazz = clazz; this.log = log; if (debugReflection && log.isDebugEnabled()) { log.debug("================================================================="); log.debug("== Class: " + clazz); } methodCache = createMethodCache(); if (debugReflection && log.isDebugEnabled()) { log.debug("================================================================="); } }
/** * Standard constructor * @param clazz The class for which this ClassMap gets constructed. */ public ClassMap(final Class clazz, final Log log) { this.clazz = clazz; this.log = log; if (debugReflection && log.isDebugEnabled()) { log.debug("================================================================="); log.debug("== Class: " + clazz); } methodCache = createMethodCache(); if (debugReflection && log.isDebugEnabled()) { log.debug("================================================================="); } }
/** * @see org.apache.velocity.runtime.resource.ResourceCache#initialize(org.apache.velocity.runtime.RuntimeServices) */ public void initialize( RuntimeServices rs ) { rsvc = rs; int maxSize = rsvc.getInt(RuntimeConstants.RESOURCE_MANAGER_DEFAULTCACHE_SIZE, 89); if (maxSize > 0) { // Create a whole new Map here to avoid hanging on to a // handle to the unsynch'd LRUMap for our lifetime. Map lruCache = Collections.synchronizedMap(new LRUMap(maxSize)); lruCache.putAll(cache); cache = lruCache; } rsvc.getLog().debug("ResourceCache: initialized ("+this.getClass()+") with "+ cache.getClass()+" cache map."); }
/** * @param rs * @param urlpath */ public JarHolder( RuntimeServices rs, String urlpath ) { this.log = rs.getLog(); this.urlpath=urlpath; init(); if (log.isDebugEnabled()) { log.debug("JarHolder: initialized JAR: " + urlpath); } }
/** * Init or die! (with some log help, of course) */ private void requireInitialization() { if (!initialized && !initializing) { log.debug("Velocity was not initialized! Calling init()..."); try { init(); } catch (Exception e) { getLog().error("Could not auto-initialize Velocity", e); throw new RuntimeException("Velocity could not be initialized!", e); } } }
/** * @param rs * @param urlpath */ public JarHolder( RuntimeServices rs, String urlpath ) { this.log = rs.getLog(); this.urlpath=urlpath; init(); if (log.isDebugEnabled()) { log.debug("JarHolder: initialized JAR: " + urlpath); } }
public Number perform(Number left, Number right, InternalContextAdapter context) { /* * check for divide by 0 */ if (MathUtils.isZero(right)) { String msg = "Right side of division operation is zero. Must be non-zero. " + getLocation(context); if (strictMode) { log.error(msg); throw new MathException(msg); } else { log.debug(msg); return null; } } return MathUtils.divide(left, right); } }
/** * Create the underlying "pool". * @param rsvc */ public void initialize(RuntimeServices rsvc) { max = rsvc.getInt(RuntimeConstants.PARSER_POOL_SIZE, RuntimeConstants.NUMBER_OF_PARSERS); pool = new SimplePool(max); for (int i = 0; i < max; i++) { pool.put(rsvc.createNewParser()); } if (rsvc.getLog().isDebugEnabled()) { rsvc.getLog().debug("Created '" + max + "' parsers."); } }
/** * Create the underlying "pool". * @param rsvc */ public void initialize(RuntimeServices rsvc) { max = rsvc.getInt(RuntimeConstants.PARSER_POOL_SIZE, RuntimeConstants.NUMBER_OF_PARSERS); pool = new SimplePool(max); for (int i = 0; i < max; i++) { pool.put(rsvc.createNewParser()); } if (rsvc.getLog().isDebugEnabled()) { rsvc.getLog().debug("Created '" + max + "' parsers."); } }
public void initialize(RuntimeServices rsvc) { config = new GenericObjectPool.Config(); config.maxActive = rsvc.getInt(Props.MAX_ACTIVE, Props.MAX_ACTIVE_DEFAULT); config.maxIdle = rsvc.getInt(Props.MAX_IDLE, Props.MAX_IDLE_DEFAULT); config.maxWait = rsvc.getInt(Props.MAX_WAIT, Props.MAX_WAIT_DEFAULT); config.timeBetweenEvictionRunsMillis = -1; // -1 to disable evictor thread. pool = new GenericObjectPool(new ParserFactory(rsvc), config); if (rsvc.getLog().isDebugEnabled()) { rsvc.getLog().debug("Created parser pool: " + this); } }