Return-Path: X-Original-To: apmail-ignite-user-archive@minotaur.apache.org Delivered-To: apmail-ignite-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A3E5919549 for ; Mon, 14 Mar 2016 05:27:44 +0000 (UTC) Received: (qmail 88856 invoked by uid 500); 14 Mar 2016 05:27:44 -0000 Delivered-To: apmail-ignite-user-archive@ignite.apache.org Received: (qmail 88808 invoked by uid 500); 14 Mar 2016 05:27:44 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 88798 invoked by uid 99); 14 Mar 2016 05:27:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Mar 2016 05:27:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C76E11A02A1 for ; Mon, 14 Mar 2016 05:27:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.972 X-Spam-Level: X-Spam-Status: No, score=0.972 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id vORQZgDo2INT for ; Mon, 14 Mar 2016 05:27:42 +0000 (UTC) Received: from mbob.nabble.com (mbob.nabble.com [162.253.133.15]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 3A9315F620 for ; Mon, 14 Mar 2016 05:27:42 +0000 (UTC) Received: from malf.nabble.com (unknown [162.253.133.59]) by mbob.nabble.com (Postfix) with ESMTP id DD68A22DFCC6 for ; Sun, 13 Mar 2016 22:18:14 -0700 (PDT) Date: Sun, 13 Mar 2016 22:14:54 -0700 (PDT) From: Kobe To: user@ignite.apache.org Message-ID: <1457932494802-3479.post@n6.nabble.com> In-Reply-To: <1457824363536-3474.post@n6.nabble.com> References: <1457766324450-3471.post@n6.nabble.com> <1457824363536-3474.post@n6.nabble.com> Subject: Re: Relation between CacheStore and IgniteCache MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Could anyone please confirm my understanding? That is, if I need to cache distinct entities (attached to the same hibernate session), I must create distinct IgniteCache instances? Regards, Kobe Kobe wrote > Denis, > > I need to cache a collection of objects of different types (a collection > of campuses <Long, Campus>, collection of <Long, Building>, > and a collection of residents > <Long, Resident>). Does this mean I have instantiate three distinct > caches > IgniteCache<Long, Campus>, > IgniteCache<Long, Building> > and Ignite<Long, Resident> > > and attach corresponding CacheStore entities? How would a SQL join across > these entities work? > Also, I am using HibernateSessionListener to populate these caches. Is > there any gotcha I should be > aware of wrt it? > > thanx, > > /Kobe > Denis Magda wrote >> Hi Kobe, >> >> CacheStore is set for every IgniteCache using >> CacheConfiguration.setCacheStoreFactory(...) method as it's shown in this >> example [1]. >> >> IgniteCache.loadCache(...) parameters can be used to control a subset of >> data that should be loaded from an underlying persistent storage into a >> cache. >> >> Also I would recommend to take a look at examples that showcase how the >> store works in practice [2] >> >> [1] >> https://apacheignite.readme.io/docs/persistent-store#cachestore-example >> [2] >> https://github.com/apache/ignite/tree/master/examples/src/main/java/org/apache/ignite/examples/datagrid/store >> >> On Sat, Mar 12, 2016 at 10:05 AM, Kobe < >> rk_@ >> > wrote: >> >>> >>> Hello... >>> >>> I am trying to understand how CacheStore behaviour is inserted into >>> IgniteCache. >>> I see in the Javadoc of IgniteCache that the loadCache() method passes >>> optional arguments >>> to CacheStore.loadCache(). I do not understand this correlation. >>> >>> Please explain? >>> >>> /Kobe >>> >>> >>> >>> -- >>> View this message in context: >>> http://apache-ignite-users.70518.x6.nabble.com/Relation-between-CacheStore-K-V-and-IgniteCache-K-V-tp3471.html >>> Sent from the Apache Ignite Users mailing list archive at Nabble.com. >>> -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Relation-between-CacheStore-K-V-and-IgniteCache-K-V-tp3471p3479.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.