no.sesat.search.view.velocity
Class QuickResourceCacheImpl

java.lang.Object
  extended by no.sesat.search.view.velocity.QuickResourceCacheImpl
All Implemented Interfaces:
org.apache.velocity.runtime.resource.ResourceCache

public final class QuickResourceCacheImpl
extends Object
implements org.apache.velocity.runtime.resource.ResourceCache

A faster implementation of the resource cache than the default. The default implementation uses a fully synchronized LRUMap.

This implementation only supports an unbounded cache size and will throw IllegalArgumentException if Velocity is set to anything other than zero.

See Also:
ResourceCacheImpl

Field Summary
static String INITIAL_SIZE_PROPERTY
          Property name for controlling the initial size of the cache.
 
Constructor Summary
QuickResourceCacheImpl()
           
 
Method Summary
 Iterator enumerateKeys()
          
 org.apache.velocity.runtime.resource.Resource get(Object o)
          
 void initialize(org.apache.velocity.runtime.RuntimeServices svc)
          
 org.apache.velocity.runtime.resource.Resource put(Object o, org.apache.velocity.runtime.resource.Resource resource)
          
 org.apache.velocity.runtime.resource.Resource remove(Object o)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIAL_SIZE_PROPERTY

public static final String INITIAL_SIZE_PROPERTY
Property name for controlling the initial size of the cache.

See Also:
Constant Field Values
Constructor Detail

QuickResourceCacheImpl

public QuickResourceCacheImpl()
Method Detail

initialize

public void initialize(org.apache.velocity.runtime.RuntimeServices svc)

Specified by:
initialize in interface org.apache.velocity.runtime.resource.ResourceCache

get

public org.apache.velocity.runtime.resource.Resource get(Object o)

Specified by:
get in interface org.apache.velocity.runtime.resource.ResourceCache

put

public org.apache.velocity.runtime.resource.Resource put(Object o,
                                                         org.apache.velocity.runtime.resource.Resource resource)

Specified by:
put in interface org.apache.velocity.runtime.resource.ResourceCache

remove

public org.apache.velocity.runtime.resource.Resource remove(Object o)

Specified by:
remove in interface org.apache.velocity.runtime.resource.ResourceCache

enumerateKeys

public Iterator enumerateKeys()

Specified by:
enumerateKeys in interface org.apache.velocity.runtime.resource.ResourceCache


Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.