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

java.lang.Object
  extended by org.apache.commons.ognl.internal.ReentrantReadWriteLockCache<K,V>
All Implemented Interfaces:
Cache<K,V>

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


Constructor Summary
ReentrantReadWriteLockCache()
           
ReentrantReadWriteLockCache(CacheEntryFactory<K,V> cacheEntryFactory)
           
 
Method Summary
 void clear()
           
 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

ReentrantReadWriteLockCache

public ReentrantReadWriteLockCache()

ReentrantReadWriteLockCache

public ReentrantReadWriteLockCache(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>


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