On 24 July 2013 18:42, Mircea Markus <[email protected]> wrote: > > On 24 Jul 2013, at 17:16, Sanne Grinovero <[email protected]> wrote: > >> Also: >> - support to efficiently preload only the owned entries > > We'd still need to iterate over all the stored keys to decide which maps to > the local node, but we won't have to load the entries. Is that what you have > in mind?
Ideally you wouldn't want to iterate on the keys: some storage engines could run the CHM function as a selection criteria (among others, those supporting Map/Reduce can do it; some of these run in Java making this relatively easy - also for HotRod we'll likely have to maintain CHM implementations in other languages anyway). I realize that's complex to implement but the important change is to not disallow such optimisations by using a limiting SPI: if the CacheStore SPI would allow that, then people would be able to try implement such smarter stores.. otherwise it's impossible. Today we load all keys first, a good start would be to load them all as a stream rather than as a single Set. > >> - expiry of entries without loading them in memory > > This is something we do already with CacheStore.purgeExpired right, forgot :-) >> - pass one (or more) existing CacheStore instance(s) into a starting >> CacheManager to be used > > Something to consider but out of the scope of this change. > >> New one, after recent talking to myself :-) : >> - Allow the CacheStore instance to get a reference to the Cache >> itself: I need to perform a get() operation from the CacheStore to >> implement "write behind" to a relational database, in case you have >> mapped entities -> OGM -> Infinispan -> ORM -> relational database and >> want to respect the original mapping. >> Otherwise entries might be incomplete, or get written in the wrong >> order, violating referential integrity rules. > > The CacheLoader.init(..) method does this already, I'll make sure it doesn't > go away in this release :-) thanks Sanne > >> >> In other words, just allow me to inject a reference to the >> CacheManager in the CacheStore instance. >> > > Cheers, > -- > Mircea Markus > Infinispan lead (www.infinispan.org) > > > > > > _______________________________________________ > infinispan-dev mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/infinispan-dev _______________________________________________ infinispan-dev mailing list [email protected] https://lists.jboss.org/mailman/listinfo/infinispan-dev
