net.sourceforge.wurfl.core.cache
Interface CacheProvider

All Known Implementing Classes:
DoubleLRUMapCacheProvider, EhCacheProvider, HashMapCacheProvider, JSR107CacheProvider, LRUMapCacheProvider, NullCacheProvider

public interface CacheProvider

Provide cache feature.

Add support to some funny cache library implementing this interface.

Version:
$Id: CacheProvider.java 934 2012-03-27 13:34:26Z fulvio.crivellaro $

Field Summary
static org.slf4j.Logger logger
           
 
Method Summary
 void clear()
          Remove all items from cache.
 Device getDevice(String key)
          Returns the cached item.
 Device getDeviceFromDeviceId(String deviceId)
          Returns the cached device, from the deviceId.
 void putDevice(String key, Device value)
          Put an item in cache associated to a key.
 

Field Detail

logger

static final org.slf4j.Logger logger
Method Detail

getDevice

Device getDevice(String key)
Returns the cached item.

Parameters:
key - The cached item key.
Returns:
Cached Object, null if this cache does not contain it.

getDeviceFromDeviceId

Device getDeviceFromDeviceId(String deviceId)
Returns the cached device, from the deviceId.

Parameters:
key - The cached item device Id.
Returns:
Cached Device, null if this cache does not contain it.

putDevice

void putDevice(String key,
               Device value)
Put an item in cache associated to a key.

Parameters:
key - The caching item key.
value - The caching item.

clear

void clear()
Remove all items from cache.



Copyright © 2012 ScientiaMobile Inc.. All Rights Reserved.