de.smartics.properties.spi.config.cache.guava
Class GuavaDelegatingCache<K,V>

Package class diagram package GuavaDelegatingCache
java.lang.Object
  extended by de.smartics.properties.spi.config.cache.guava.GuavaDelegatingCache<K,V>
Type Parameters:
K - type of the key.
V - type of the value.
All Implemented Interfaces:
de.smartics.properties.spi.config.cache.Cache<K,V>, de.smartics.properties.spi.config.cache.UnawareCache<K,V>

public final class GuavaDelegatingCache<K,V>
     
     
extends Object
implements de.smartics.properties.spi.config.cache.Cache<K,V>

Guava-Loading-Cache implementation of a cache.


Constructor Summary
GuavaDelegatingCache(com.google.common.cache.Cache<K,V> cache)
          Constructor.
 
Method Summary
 V get(K key)
           
 Set<K> keySet()
           
 void put(K key, V value)
           
 void put(K key, V value, int lifespan, TimeUnit lifespanTimeUnit, int maxIdleTime, TimeUnit maxIdleTimeTimeUnit)
           
 void put(K key, V value, long updateIntervalInMs, TimeUnit milliseconds)
           
 V remove(K key)
           
 long size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuavaDelegatingCache

public GuavaDelegatingCache(com.google.common.cache.Cache<K,V> cache)
Constructor.

Parameters:
cache - the cache to delegate to.
Method Detail

size

public long size()
Specified by:
size in interface de.smartics.properties.spi.config.cache.Cache<K,V>

get

public V get(K key)
Specified by:
get in interface de.smartics.properties.spi.config.cache.UnawareCache<K,V>

put

public void put(K key,
                V value)
Specified by:
put in interface de.smartics.properties.spi.config.cache.UnawareCache<K,V>

put

public void put(K key,
                V value,
                long updateIntervalInMs,
                TimeUnit milliseconds)
Specified by:
put in interface de.smartics.properties.spi.config.cache.UnawareCache<K,V>

put

public void put(K key,
                V value,
                int lifespan,
                TimeUnit lifespanTimeUnit,
                int maxIdleTime,
                TimeUnit maxIdleTimeTimeUnit)
Specified by:
put in interface de.smartics.properties.spi.config.cache.UnawareCache<K,V>

remove

public V remove(K key)
Specified by:
remove in interface de.smartics.properties.spi.config.cache.UnawareCache<K,V>

keySet

public Set<K> keySet()
Specified by:
keySet in interface de.smartics.properties.spi.config.cache.Cache<K,V>


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.