Created
April 8, 2009 16:37
-
-
Save ddeaguiar/91856 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//it requires reflection...how unfortunate. | |
public List getKeys() { | |
Cache cache = getCacheAdministrator().getCache(); | |
try { | |
Field mapField = cache.getClass().getDeclaredField("cacheMap"); | |
mapField.setAccessible(true); | |
LRUCache map = (LRUCache) mapField.get(cache); | |
return new ArrayList(map.keySet()); | |
} catch (Exception e) { | |
log.error(e); | |
return new ArrayList(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment