TUM CCSM Commons

edu.tum.cs.commons.cache
Class LRUStraightCacheBase<I,E,X extends java.lang.Exception>

java.lang.Object
  extended by edu.tum.cs.commons.cache.CacheBase<I,H,E,X>
      extended by edu.tum.cs.commons.cache.LRUCacheBase<I,I,E,X>
          extended by edu.tum.cs.commons.cache.LRUStraightCacheBase<I,E,X>
Type Parameters:
I - the index type of the cache
E - the type stored in the cache
X - the type of exception thrown by the CacheBase.obtainItem(Object) method. Use the NeverThrownRuntimeException if no exception will be thrown.
Direct Known Subclasses:
LRUCachingParameterizedFactory

public abstract class LRUStraightCacheBase<I,E,X extends java.lang.Exception>
extends LRUCacheBase<I,I,E,X>

This a special base class for last recently used (LRU) caches that work with identifiers that are suitable as hash keys.

Version:
$Rev: 26268 $
Author:
Florian Deissenboeck, $Author: juergens $
Rating:
GREEN Hash: BDFF6A27A0F84128189790591C459DE8

Constructor Summary
LRUStraightCacheBase(int maxSize)
          Constructor.
 
Method Summary
protected  I getHashKey(I identifier)
          This method simply returns the identifier.
 
Methods inherited from class edu.tum.cs.commons.cache.LRUCacheBase
getItem
 
Methods inherited from class edu.tum.cs.commons.cache.CacheBase
obtainItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LRUStraightCacheBase

public LRUStraightCacheBase(int maxSize)
Constructor.

Method Detail

getHashKey

protected I getHashKey(I identifier)
This method simply returns the identifier.

Specified by:
getHashKey in class CacheBase<I,I,E,X extends java.lang.Exception>
Returns:
an object that is suitable hash key
See Also:
Object.hashCode()

TUM CCSM Commons

TUM CCSM Commons - 2.7