no.sesat.search.view.velocity
Class QuickResourceManagerImpl
java.lang.Object
org.apache.velocity.runtime.resource.ResourceManagerImpl
no.sesat.search.view.velocity.QuickResourceManagerImpl
- All Implemented Interfaces:
- org.apache.velocity.runtime.resource.ResourceManager
public final class QuickResourceManagerImpl
- extends org.apache.velocity.runtime.resource.ResourceManagerImpl
A quicker replacement for ResourceManagerImpl that avoids
doing resource loading and parsing while holding a global exclusive lock. This implementation creates new resource
instances instead of updating existing ones and loads and parses them in the background. This removes the need for
locking and the only synchronization done is whatever synchronization measures the cache is taking. Resources not yet
in the cache are loaded synchronously. The reduced locking is achieved at the expense of resources possibly getting
loaded several times during startup or reload.
- Version:
- $Id: QuickResourceManagerImpl.java 7225 2009-04-09 00:32:20Z ssmiweve $
| Fields inherited from class org.apache.velocity.runtime.resource.ResourceManagerImpl |
globalCache, log, RESOURCE_CONTENT, RESOURCE_TEMPLATE, resourceLoaders, rsvc |
|
Method Summary |
org.apache.velocity.runtime.resource.Resource |
getResource(String name,
int type,
String encoding)
Overridden to layer caching capabilities. |
| Methods inherited from class org.apache.velocity.runtime.resource.ResourceManagerImpl |
getLoaderNameForResource, getResource, initialize, loadResource, refreshResource |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QuickResourceManagerImpl
public QuickResourceManagerImpl()
getResource
public org.apache.velocity.runtime.resource.Resource getResource(String name,
int type,
String encoding)
throws Exception
-
Overridden to layer caching capabilities.
- Specified by:
getResource in interface org.apache.velocity.runtime.resource.ResourceManager- Overrides:
getResource in class org.apache.velocity.runtime.resource.ResourceManagerImpl
- Throws:
Exception
Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.