edu.internet2.middleware.grouperClient.jdbc
Class GcDbQueryCacheMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<MultiKey,GcDbQueryCache>
          extended by edu.internet2.middleware.grouperClient.jdbc.GcDbQueryCacheMap
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<MultiKey,GcDbQueryCache>

public class GcDbQueryCacheMap
extends java.util.HashMap<MultiKey,GcDbQueryCache>

Map for caching some query results for x amount of time. This map checks itself every X minutes and evicts expired content.

Author:
harveycg
See Also:
Serialized Form

Nested Class Summary
 class GcDbQueryCacheMap.Janitor
          Associated thread to call get every once in a while to ensure that eviction happens.
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
GcDbQueryCacheMap()
          Constructor.
 
Method Summary
 GcDbQueryCache get(java.lang.Object key)
          Return the object if it is not expired and if it exists.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

GcDbQueryCacheMap

public GcDbQueryCacheMap()
Constructor.

Method Detail

get

public GcDbQueryCache get(java.lang.Object key)
Return the object if it is not expired and if it exists.

Specified by:
get in interface java.util.Map<MultiKey,GcDbQueryCache>
Overrides:
get in class java.util.HashMap<MultiKey,GcDbQueryCache>
See Also:
HashMap.get(java.lang.Object)