ro.isdc.wro.cache.support
Class CacheStrategyDecorator<K,V>

java.lang.Object
  extended by ro.isdc.wro.util.AbstractDecorator<CacheStrategy<K,V>>
      extended by ro.isdc.wro.cache.support.CacheStrategyDecorator<K,V>
All Implemented Interfaces:
CacheStrategy<K,V>, ObjectDecorator<CacheStrategy<K,V>>
Direct Known Subclasses:
AbstractSynchronizedCacheStrategyDecorator

public class CacheStrategyDecorator<K,V>
extends AbstractDecorator<CacheStrategy<K,V>>
implements CacheStrategy<K,V>

A decorator of CacheStrategy.

Since:
1.4.6
Author:
Alex Objelean

Constructor Summary
CacheStrategyDecorator(CacheStrategy<K,V> decorated)
           
 
Method Summary
 void clear()
          Clear all cache contents.
 void destroy()
          Perform the clean up.
 V get(K key)
          Restore a value from the cache.
 void put(K key, V value)
          Put a value in the cache using a key.
 
Methods inherited from class ro.isdc.wro.util.AbstractDecorator
getDecoratedObject, getOriginalDecoratedObject, getOriginalDecoratedObject, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheStrategyDecorator

public CacheStrategyDecorator(CacheStrategy<K,V> decorated)
Method Detail

put

public void put(K key,
                V value)
Put a value in the cache using a key.

Specified by:
put in interface CacheStrategy<K,V>
Parameters:
key - Object.
value - Object.

get

public V get(K key)
Restore a value from the cache.

Specified by:
get in interface CacheStrategy<K,V>
Parameters:
key - Object
Returns:
value Object.

clear

public void clear()
Clear all cache contents.

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

destroy

public void destroy()
Perform the clean up.

Specified by:
destroy in interface CacheStrategy<K,V>


Copyright © 2008-2013. All Rights Reserved.