org.openjena.atlas.lib.cache
Class CacheWithGetter<K,V>

java.lang.Object
  extended by org.openjena.atlas.lib.cache.CacheWrapper<K,V>
      extended by org.openjena.atlas.lib.cache.CacheWithGetter<K,V>
All Implemented Interfaces:
Cache<K,V>

public class CacheWithGetter<K,V>
extends CacheWrapper<K,V>

Cache that takes a Getter to automatically fill cache misses.


Constructor Summary
CacheWithGetter(Cache<K,V> cache, Getter<K,V> getter)
           
 
Method Summary
 V get(K key)
          Get from cache - or return null.
 
Methods inherited from class org.openjena.atlas.lib.cache.CacheWrapper
clear, containsKey, isEmpty, keys, put, remove, setDropHandler, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheWithGetter

public CacheWithGetter(Cache<K,V> cache,
                       Getter<K,V> getter)
Method Detail

get

public V get(K key)
Description copied from interface: Cache
Get from cache - or return null. Implementations should state whether they are thread-safe or not.

Specified by:
get in interface Cache<K,V>
Overrides:
get in class CacheWrapper<K,V>


Licenced under the Apache License, Version 2.0