com.spoledge.audao.db.dao
Class ChainedDtoCache<K,V>

java.lang.Object
  extended by com.spoledge.audao.db.dao.ChainedDtoCache<K,V>
All Implemented Interfaces:
DtoCache<K,V>

public class ChainedDtoCache<K,V>
extends java.lang.Object
implements DtoCache<K,V>

Chains caches.


Constructor Summary
ChainedDtoCache(DtoCache<K,V> level1, DtoCache<K,V> level2)
           
 
Method Summary
 void clear()
          Clears the cache.
 V get(K key)
          Returns the associated object or null.
 void put(K key, V value)
          Puts the key/value pair into the cache.
 void remove(K key)
          Removes the associated object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainedDtoCache

public ChainedDtoCache(DtoCache<K,V> level1,
                       DtoCache<K,V> level2)
Method Detail

get

public V get(K key)
Returns the associated object or null.

Specified by:
get in interface DtoCache<K,V>

put

public void put(K key,
                V value)
Puts the key/value pair into the cache.

Specified by:
put in interface DtoCache<K,V>

remove

public void remove(K key)
Removes the associated object.

Specified by:
remove in interface DtoCache<K,V>

clear

public void clear()
Clears the cache.

Specified by:
clear in interface DtoCache<K,V>


Copyright © 2010 Spolecne s.r.o. All Rights Reserved.