|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.tum.cs.commons.cache.CacheBase<I,H,E,X>
edu.tum.cs.commons.cache.LRUCacheBase<I,I,E,X>
edu.tum.cs.commons.cache.LRUStraightCacheBase<P,T,X>
edu.tum.cs.commons.factory.LRUCachingParameterizedFactory<T,P,X>
T - Type that gets created by the factory.P - Parameter that is used for creation.X - Exception that can get thrown during execution of the factory
method. If no exception is thrown, use
NeverThrownRuntimeException.public class LRUCachingParameterizedFactory<T,P,X extends Exception>
Caching factory which can reuse created objects. Creation is delegated to an
inner factory, while for caching a LRUCacheBase is used.
| Constructor Summary | |
|---|---|
LRUCachingParameterizedFactory(IParameterizedFactory<T,P,X> inner,
int maxSize)
Constructor. |
|
| Method Summary | |
|---|---|
T |
create(P parameter)
Factory method |
protected T |
obtainItem(P identifier)
Extenders of the cache class must implemented that method to define the item acquisition mechanism. |
| Methods inherited from class edu.tum.cs.commons.cache.LRUStraightCacheBase |
|---|
getHashKey |
| Methods inherited from class edu.tum.cs.commons.cache.LRUCacheBase |
|---|
getItem |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LRUCachingParameterizedFactory(IParameterizedFactory<T,P,X> inner,
int maxSize)
| Method Detail |
|---|
protected T obtainItem(P identifier)
throws X extends Exception
Delegates to the inner factory.
obtainItem in class CacheBase<P,P,T,X extends Exception>identifier - identifer unambiguously identifying the item.
X extends Exception
public T create(P parameter)
throws X extends Exception
Forwards to the LRUCacheBase.getItem(Object) method.
create in interface IParameterizedFactory<T,P,X extends Exception>X extends Exception
|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||