Return-Path: X-Original-To: apmail-ignite-dev-archive@minotaur.apache.org Delivered-To: apmail-ignite-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 88ECD176E0 for ; Sat, 17 Jan 2015 14:28:47 +0000 (UTC) Received: (qmail 26839 invoked by uid 500); 17 Jan 2015 14:28:49 -0000 Delivered-To: apmail-ignite-dev-archive@ignite.apache.org Received: (qmail 26801 invoked by uid 500); 17 Jan 2015 14:28:49 -0000 Mailing-List: contact dev-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list dev@ignite.incubator.apache.org Received: (qmail 26790 invoked by uid 99); 17 Jan 2015 14:28:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Jan 2015 14:28:49 +0000 X-ASF-Spam-Status: No, hits=-1997.8 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 17 Jan 2015 14:28:48 +0000 Received: (qmail 26435 invoked by uid 99); 17 Jan 2015 14:27:12 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Jan 2015 14:27:12 +0000 Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 465561A0234 for ; Sat, 17 Jan 2015 14:27:12 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id wo20so23183461obc.13 for ; Sat, 17 Jan 2015 06:27:10 -0800 (PST) X-Gm-Message-State: ALoCoQk/FqlMGMGMECC0zE2rxnZE1It3/2W8syDyemDuKRGsFjKJdnwQxQ4rqk0wSb7UnY/CJa8a X-Received: by 10.202.176.132 with SMTP id z126mr11781545oie.41.1421504830349; Sat, 17 Jan 2015 06:27:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.202.206.129 with HTTP; Sat, 17 Jan 2015 06:26:30 -0800 (PST) In-Reply-To: References: From: Dmitriy Setrakyan Date: Sat, 17 Jan 2015 06:26:30 -0800 Message-ID: Subject: Re: Addition of new methods to IgniteCache API To: "dev@ignite.incubator.apache.org" Content-Type: multipart/alternative; boundary=001a113c23f275bf3c050cd9e2ed X-Virus-Checked: Checked by ClamAV on apache.org --001a113c23f275bf3c050cd9e2ed Content-Type: text/plain; charset=UTF-8 On Sat, Jan 17, 2015 at 2:14 AM, Sergi Vladykin wrote: > May be its better to pass cache entry to predicate? > In my view, using IngiteBiPredicate instead of IgnitePredicate> is easier to read and is more consistent with EntryProcessor design from JCache. > > Also removeIf(key, val, IgniteBiPredicate) signature looks weird to > me. Why pass value there? > You are absolutely right. -------- boolean putIf(key, val, IgniteBiPredicate) boolean removeIf(key, IgniteBiPredicate) -------- > regards, > Sergi Vladykin > > 2015-01-17 5:57 GMT+03:00 Dmitriy Setrakyan : > > > I would like to propose adding 2 additional convenience methods to the > > IgniteCache API: > > ----------- > > boolean putIf(key, val, IgniteBiPredicate) > > boolean removeIf(key, val, IgniteBiPredicate) > > ----------- > > > > Currently user must call one of the JCache.invoke(key, EntryProcessor, > > args) methods, and then calling explicit put from inside the > EntryProcessor > > logic. The new APIs will allow a convenient shortcut for this type of > > functionality. > > > > Let me know if you agree, or if you feel that we should just have the > > JCache.invoke(...) functionality. > > > > D. > > > --001a113c23f275bf3c050cd9e2ed--