de.smartics.properties.spi.config.cache
Interface UnawareCache<K,V>

Package class diagram package UnawareCache
Type Parameters:
K - the type variable for the key.
V - the type variable for the value.
All Known Subinterfaces:
Cache<K,V>
All Known Implementing Classes:
AmnesiaCache, InMemoryCache

public interface UnawareCache<K,V>

The cache interface for all unaware caches for smartics properties. An unaware cache is not aware wht is stored within. It does not know its size, nor its keys.


Method Summary
 V get(K key)
          Returns the value from the cache for the given key.
 void put(K key, V value)
          Put the given value in the cache under the given key.
 void put(K key, V value, int lifespan, TimeUnit lifespanTimeUnit, int maxIdleTime, TimeUnit maxIdleTimeTimeUnit)
          Put the given value with the given properties in the cache under the given key.
 void put(K key, V value, long updateIntervalInMs, TimeUnit milliseconds)
          Put the given value with the given properties in the cache under the given key.
 V remove(K key)
          Removes the value for the given key.
 

Method Detail

get

V get(K key)
Returns the value from the cache for the given key.

Parameters:
key - the key to retrieve a value for.
Returns:
the stored value for the given key.

put

void put(K key,
         V value)
Put the given value in the cache under the given key.

Parameters:
key - the key to store the value.
value - the value.

put

void put(K key,
         V value,
         long updateIntervalInMs,
         TimeUnit milliseconds)
Put the given value with the given properties in the cache under the given key.

Parameters:
key - the key to store the value.
value - the value.
updateIntervalInMs - alue.the update time.
milliseconds - the time unit.

put

void put(K key,
         V value,
         int lifespan,
         TimeUnit lifespanTimeUnit,
         int maxIdleTime,
         TimeUnit maxIdleTimeTimeUnit)
Put the given value with the given properties in the cache under the given key.

Parameters:
key - the key to store the value.
value - the value.
lifespan - lifespan
lifespanTimeUnit - lifespanTimeUnit
maxIdleTime - maxIdleTime
maxIdleTimeTimeUnit - maxIdleTimeTimeUnit

remove

V remove(K key)
Removes the value for the given key.

Parameters:
key - the key for which the value shall be removed.
Returns:
the removed v


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