org.dozer.cache
Class DozerCache<KeyType,ValueType>

java.lang.Object
  extended by org.dozer.cache.DozerCache<KeyType,ValueType>
All Implemented Interfaces:
Cache<KeyType,ValueType>

public class DozerCache<KeyType,ValueType>
extends Object
implements Cache<KeyType,ValueType>

Map backed Cache implementation.

Author:
tierney.matt, dmitry.buzdin

Constructor Summary
DozerCache(String name, int maximumSize)
           
 
Method Summary
 void addEntries(Collection<CacheEntry<KeyType,ValueType>> entries)
           
 void clear()
           
 boolean containsKey(KeyType key)
           
 ValueType get(KeyType key)
           
 Collection<CacheEntry<KeyType,ValueType>> getEntries()
           
 long getMaxSize()
           
 String getName()
           
 long getSize()
           
 Set<KeyType> keySet()
           
 void put(KeyType key, ValueType value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DozerCache

public DozerCache(String name,
                  int maximumSize)
Method Detail

clear

public void clear()
Specified by:
clear in interface Cache<KeyType,ValueType>

put

public void put(KeyType key,
                ValueType value)
Specified by:
put in interface Cache<KeyType,ValueType>

get

public ValueType get(KeyType key)
Specified by:
get in interface Cache<KeyType,ValueType>

addEntries

public void addEntries(Collection<CacheEntry<KeyType,ValueType>> entries)

getEntries

public Collection<CacheEntry<KeyType,ValueType>> getEntries()

getName

public String getName()
Specified by:
getName in interface Cache<KeyType,ValueType>

getSize

public long getSize()
Specified by:
getSize in interface Cache<KeyType,ValueType>

getMaxSize

public long getMaxSize()
Specified by:
getMaxSize in interface Cache<KeyType,ValueType>

containsKey

public boolean containsKey(KeyType key)
Specified by:
containsKey in interface Cache<KeyType,ValueType>

keySet

public Set<KeyType> keySet()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2005-2011 dozer. All Rights Reserved.