Return-Path: X-Original-To: apmail-incubator-clerezza-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-clerezza-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D4EE8E35D for ; Fri, 8 Feb 2013 14:32:30 +0000 (UTC) Received: (qmail 39039 invoked by uid 500); 8 Feb 2013 14:32:30 -0000 Delivered-To: apmail-incubator-clerezza-dev-archive@incubator.apache.org Received: (qmail 38938 invoked by uid 500); 8 Feb 2013 14:32:29 -0000 Mailing-List: contact clerezza-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: clerezza-dev@incubator.apache.org Delivered-To: mailing list clerezza-dev@incubator.apache.org Received: (qmail 38911 invoked by uid 99); 8 Feb 2013 14:32:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2013 14:32:28 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rupert.westenthaler@gmail.com designates 74.125.82.51 as permitted sender) Received: from [74.125.82.51] (HELO mail-wg0-f51.google.com) (74.125.82.51) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2013 14:32:22 +0000 Received: by mail-wg0-f51.google.com with SMTP id 8so2942659wgl.6 for ; Fri, 08 Feb 2013 06:32:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=gwyCrXrwEYXveNQ84D02yTMUulx2uPFzjqYQ5h8HVqc=; b=v8tgnM7pXMC1HloMJWfgUXFuL2xvLOTc36jdEh4fG3EuIZlvq3ZRNSk4pVSVzyPfHf YkWUFQe9hl08ahyVHVB2PA/ebrJw09SJYhaS9rhpReTawGMn5HiPZp+TtiUBtfqGs5TQ fwhvx7HAebBuwyt+0DCy36ZpkSyo0WF+ce4VlZ46HG7gy3FL2PO0WDGD4wmMCEGA3Svu jH+zVBEbi9JeHukFVSiwaxJr5+XuSR3PQfNL4v1XMLQEAzN1UTQpPRUntEPodD85Rcis dmN7FVMo9vC+QoHy7O3enYmq86mjQF39U4kBd6CR9V7852ExIzfsAKkkyOqxHbRBKYOK mQ6w== MIME-Version: 1.0 X-Received: by 10.194.76.37 with SMTP id h5mr2904096wjw.21.1360333916994; Fri, 08 Feb 2013 06:31:56 -0800 (PST) Received: by 10.216.42.7 with HTTP; Fri, 8 Feb 2013 06:31:56 -0800 (PST) In-Reply-To: <5114FAF6.1030506@4sengines.com> References: <5114FAF6.1030506@4sengines.com> Date: Fri, 8 Feb 2013 15:31:56 +0100 Message-ID: Subject: Re: How to get a particular TcProvider ? From: Rupert Westenthaler To: clerezza-dev@incubator.apache.org, florent@apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Feb 8, 2013 at 2:17 PM, florent andr=C3=A9 wrote: > Hi there ! > > Working with multiple TcProvider I would like to get one in particular. > > The way I find for now is to call : > SortedSet providerList =3D tcManager.getProviderList(= ); > > And then iterate throw my providerList, and select the one I would like b= y > his "weight". > > "Weight" is really not an "user friendly" (nor reliable) property to sele= ct > something in a list imo... but I don't see any selection method based on = a > name or an ID. > > Do I miss something here ? Or a kind of "id" property can be imagined for > the TcProvider objects ? > Now there is no other property that tells something about the storage provider. If you use your own implementation you can however add additional properties to the ServiceRegistration and use them for filtering. For the default one there is only the weight as well as the full qualified name of the implementation set as value for the 'component.name'. best Rupert > Happy graph ! > ++ -- | Rupert Westenthaler rupert.westenthaler@gmail.com | Bodenlehenstra=C3=9Fe 11 ++43-699-11108907 | A-5500 Bischofshofen