public class SoftSmartCache<K,V> extends SmartCacheImpl<K,V>
SmartCacheImpl
which uses a
ReferenceMap
as a backing object. Both the key
and the value are soft references, because of their
cyclic nature.
This class does not enforce any synchronization, because
this is handled by SmartCacheImpl
.
SmartCache.SmartCacheTask<K,V>
Constructor and Description |
---|
SoftSmartCache() |
Modifier and Type | Method and Description |
---|---|
void |
clearImpl() |
V |
getImpl(K key) |
Iterator<Map.Entry<K,V>> |
iteratorImpl()
Must provide an iterator on the contents of the cache.
|
V |
putImpl(K key,
V value) |
V |
removeImpl(K key) |
int |
sizeImpl() |
public V removeImpl(K key)
removeImpl
in class SmartCacheImpl<K,V>
public void clearImpl()
clearImpl
in class SmartCacheImpl<K,V>
public int sizeImpl()
sizeImpl
in class SmartCacheImpl<K,V>
public Iterator<Map.Entry<K,V>> iteratorImpl()
SmartCacheImpl
SmartCacheImpl
.iteratorImpl
in class SmartCacheImpl<K,V>
Copyright © 2019 Hitachi Vantara. All rights reserved.