org.specrunner.util.cache
Interface ICacheFactory

All Known Implementing Classes:
AbstractCacheFactory, CacheFactoryDefault

public interface ICacheFactory

Abstraction for cache builders.

Author:
Thiago Santos

Method Summary
<K,T> ICache<K,T>
newCache(String name)
          Creates a new cache.
<K,T> ICache<K,T>
newCache(String name, ICacheCleaner<T> cleaner)
          Creates a new cache.
 

Method Detail

newCache

<K,T> ICache<K,T> newCache(String name)
Creates a new cache.

Type Parameters:
K - Key type.
T - Cache object type.
Parameters:
name - Cache name.
Returns:
A cache.

newCache

<K,T> ICache<K,T> newCache(String name,
                           ICacheCleaner<T> cleaner)
Creates a new cache.

Type Parameters:
K - Key type.
T - Cache object type.
Parameters:
name - Cache name.
cleaner - A cleaner of objects in cache when it overloads.
Returns:
A cache.


Copyright © 2014. All rights reserved.