I was wondering if, there is any way to get the cache configurated cache store ?
I've looked up in the AdvancedCache interface but found nothing.
Also, is there any way to get keys from store to do some processing on passivated entries ?
Tough the only method I see, is the one provided in : CacheLoader::Set<Object> loadAllKeys(Set<Object> keysToExclude)
to me, it would be actually quite nice to provide methods:
1. to get the actual count of keys in store,
2. to get the first x keys (max result)
3. to get the first keys 'between' y (min result) and z (max result)
most likely the hibernate/hibernate search interface permit it.
You can use the following call to retrieve the cache store:
org.infinispan.loaders.CacheStore s = cache.getAdvancedCache().getComponentRegistry().getComponent(CacheLoaderManager.class).getCacheStore();
after that, you can call methods like s.containsKey(Object key), s.store(InternalCacheEntry entry), s.load(Object key)
InternalCacheEntry is an interface and has a few implementations, e.g. ImmortalCacheEntry.
|Retrieving data ...|