On 24 May 2010, at 15:00, Mircea Markus wrote:
Hi,
1. Do we want this to be a CacheStore or CacheLoader only? Looking at
TcpDelegatingCacheLoader it also does puts, guess we want to preserve the same behaviour -
or?
Yes, it should be a store.
2. load/loadAll/loadAllKeys operations cannot be implemented (hotrod
does not support getKeys, and even so that would potentially be too costly)
Yes, these are only used when state transfer/rehashing/preloading is enabled, and none of
these make sense for a *shared* cache store. Typically, a RemoteCacheStore would be
shared so this code would not be called. An UnsupportedException (with an explanation:
RemoteCacheStore can only run in shared mode!) should be thrown.
3. at chacheStore level we have InternalCacheEntry, whilst
RemoteCache operates with the actual key/value operations. This means that (at least on
get) the expiration information is lost.
Hmm, perhaps then RemoteCache should put(key, InternalCacheValue) so that this stuff is
not lost? On get(key), you get a InternalCacheValue. I.e., your RemoteCache should be a
RemoteCache<K, InternalCacheValue<V>>
Cheers
Manik
--
Manik Surtani
manik(a)jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org