• New Feature
  • Status: Open
  • 2 Major
  • Resolution:
  • ehcache-core
  • cdennis
  • Reporter: amiller
  • October 28, 2009
  • 3
  • Watchers: 3
  • March 26, 2013

Description

Make Ehcache interfaces use Java 1.5 generics. Might be some interesting compound type signatures on the Serializable methods but I’m sure we can make it work.

Comments

Fiona OShea 2010-06-15

Assigning to Fremantle for review

Julien Kronegg 2011-08-11

As a loosy workaround, I implemented two classes:

  • ”{{CacheWrapper<K,V> implements StoreListener}}” which uses a {{Cache}} delegate
  • ”{{ElementWrapper<K,V> implements Serializable, Cloneable}}” which uses an {{Element}} delegate

Then I can use code such as:

CacheWrapper<String,Integer> cache = new CacheWrapper(cacheManager.getCache("myCache"));
cache.put(new ElementWrapper<String,Integer>("one", 1));
Integer one = cache.get("one").getValue();