From 1d8329cfde96dbdbd9d84e797a712cb9e04f8b7d Mon Sep 17 00:00:00 2001 From: stefanp Date: Fri, 22 Nov 2002 09:55:55 +0000 Subject: [PATCH] parse DocApplication when it's first accessed. added getCacheUsage() --- src/helma/framework/core/Application.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/helma/framework/core/Application.java b/src/helma/framework/core/Application.java index ba49c454..a260dffb 100644 --- a/src/helma/framework/core/Application.java +++ b/src/helma/framework/core/Application.java @@ -512,6 +512,14 @@ public final class Application implements IPathElement, Runnable { nmgr.clearCache (); } + + /** + * Returns the number of elements in the NodeManager's cache + */ + public int getCacheUsage () { + return nmgr.countCacheEntries (); + } + /** * Set the application's root element to an arbitrary object. After this is called * with a non-null object, the helma node manager will be bypassed. This function @@ -999,7 +1007,8 @@ public final class Application implements IPathElement, Runnable { if (name.equals("api")) { if ( docApp==null ) { try { - docApp = new DocApplication( this.name,appDir.toString() ); + docApp = new DocApplication (this.name, appDir.toString()); + docApp.readApplication (); } catch ( DocException e ) { return null; }