org.apache.commons.ognl.internal
Class ConcurrentHashMapCache<K,V>

java.lang.Object
  extended by org.apache.commons.ognl.internal.ConcurrentHashMapCache<K,V>
All Implemented Interfaces:
Cache<K,V>
Direct Known Subclasses:
ConcurrentHashMapClassCache

public class ConcurrentHashMapCache<K,V>
extends Object
implements Cache<K,V>


Constructor Summary
ConcurrentHashMapCache()
           
ConcurrentHashMapCache(CacheEntryFactory<K,V> cacheEntryFactory)
           
 
Method Summary
 void clear()
           
 boolean contains(K key)
           
 V get(K key)
           
 int getSize()
           
 V put(K key, V value)
           
protected  boolean shouldCreate(CacheEntryFactory<K,V> cacheEntryFactory, V v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcurrentHashMapCache

public ConcurrentHashMapCache()

ConcurrentHashMapCache

public ConcurrentHashMapCache(CacheEntryFactory<K,V> cacheEntryFactory)
Method Detail

clear

public void clear()
Specified by:
clear in interface Cache<K,V>

getSize

public int getSize()
Specified by:
getSize in interface Cache<K,V>

get

public V get(K key)
      throws CacheException
Specified by:
get in interface Cache<K,V>
Throws:
CacheException

shouldCreate

protected boolean shouldCreate(CacheEntryFactory<K,V> cacheEntryFactory,
                               V v)
                        throws CacheException
Throws:
CacheException

put

public V put(K key,
             V value)
Specified by:
put in interface Cache<K,V>

contains

public boolean contains(K key)


Copyright © 1997-2013 The Apache Software Foundation. All Rights Reserved.