Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8256A189D8 for ; Thu, 11 Jun 2015 06:12:42 +0000 (UTC) Received: (qmail 70326 invoked by uid 500); 11 Jun 2015 06:12:42 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 70289 invoked by uid 500); 11 Jun 2015 06:12:42 -0000 Mailing-List: contact commits-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 commits@ignite.incubator.apache.org Received: (qmail 70279 invoked by uid 99); 11 Jun 2015 06:12:42 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2015 06:12:42 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 00111182865 for ; Thu, 11 Jun 2015 06:12:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.771 X-Spam-Level: * X-Spam-Status: No, score=1.771 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id DGfgPnPJ9AZC for ; Thu, 11 Jun 2015 06:12:37 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id 338F127660 for ; Thu, 11 Jun 2015 06:12:26 +0000 (UTC) Received: (qmail 69196 invoked by uid 99); 11 Jun 2015 06:12:26 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2015 06:12:26 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 155E8E04BE; Thu, 11 Jun 2015 06:12:26 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vozerov@apache.org To: commits@ignite.incubator.apache.org Date: Thu, 11 Jun 2015 06:13:00 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [36/50] [abbrv] incubator-ignite git commit: #sberb-25: IgniteCache.removeAll ignores tx timeout - add JavaDoc for IgniteCache.removeAll #sberb-25: IgniteCache.removeAll ignores tx timeout - add JavaDoc for IgniteCache.removeAll Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6a155962 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6a155962 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6a155962 Branch: refs/heads/ignite-gg-10326 Commit: 6a1559623ed587bd793e922e762b5ec76af024ad Parents: 8f455a9 Author: ivasilinets Authored: Wed Jun 10 15:40:49 2015 +0300 Committer: ivasilinets Committed: Wed Jun 10 15:40:49 2015 +0300 ---------------------------------------------------------------------- .../java/org/apache/ignite/IgniteCache.java | 25 +++++++++++++++++- .../processors/cache/IgniteInternalCache.java | 27 ++++++-------------- 2 files changed, 32 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6a155962/modules/core/src/main/java/org/apache/ignite/IgniteCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java index a54adc9..2b97e55 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java @@ -30,6 +30,7 @@ import org.jetbrains.annotations.*; import javax.cache.*; import javax.cache.configuration.*; +import javax.cache.event.*; import javax.cache.expiry.*; import javax.cache.integration.*; import javax.cache.processor.*; @@ -378,7 +379,29 @@ public interface IgniteCache extends javax.cache.Cache, IgniteAsyncS @IgniteAsyncSupported @Override public void removeAll(Set keys); - /** {@inheritDoc} */ + /** + * Removes all of the mappings from this cache. + *

+ * The order that the individual entries are removed is undefined. + *

+ * For every mapping that exists the following are called: + *

    + *
  • any registered {@link CacheEntryRemovedListener}s
  • + *
  • if the cache is a write-through cache, the {@link CacheWriter}
  • + *
+ * If the cache is empty, the {@link CacheWriter} is not called. + *

+ * This operation is not transactional. It calls broadcast closure that + * deletes all primary keys from remote nodes. + *

+ * This is potentially an expensive operation as listeners are invoked. + * Use {@link #clear()} to avoid this. + * + * @throws IllegalStateException if the cache is {@link #isClosed()} + * @throws CacheException if there is a problem during the remove + * @see #clear() + * @see CacheWriter#deleteAll + */ @IgniteAsyncSupported @Override public void removeAll(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6a155962/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java index d98379c..9972f92 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java @@ -1135,11 +1135,9 @@ public interface IgniteInternalCache extends Iterable> { public IgniteInternalFuture removeAsync(K key, V val); /** - * Removes given key mappings from cache for entries for which the optionally passed in filters do - * pass. + * Removes given key mappings from cache. *

- * If write-through is enabled, the values will be removed from {@link CacheStore} - * via @link CacheStore#removeAll(Transaction, Collection) method. + * If write-through is enabled, the values will be removed from {@link CacheStore} via {@link IgniteDataStreamer}. *

Transactions

* This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1150,11 +1148,9 @@ public interface IgniteInternalCache extends Iterable> { public void removeAll(@Nullable Collection keys) throws IgniteCheckedException; /** - * Asynchronously removes given key mappings from cache for entries for which the optionally - * passed in filters do pass. + * Asynchronously removes given key mappings from cache for entries. *

- * If write-through is enabled, the values will be removed from {@link CacheStore} - * via @link CacheStore#removeAll(Transaction, Collection) method. + * If write-through is enabled, the values will be removed from {@link CacheStore} via {@link IgniteDataStreamer}. *

Transactions

* This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1166,20 +1162,13 @@ public interface IgniteInternalCache extends Iterable> { public IgniteInternalFuture removeAllAsync(@Nullable Collection keys); /** - * Removes mappings from cache for entries for which the optionally passed in filters do - * pass. If passed in filters are {@code null}, then all entries in cache will be enrolled - * into transaction. + * Removes mappings from cache. *

- * USE WITH CARE - if your cache has many entries that pass through the filter or if filter - * is empty, then transaction will quickly become very heavy and slow. Also, locks - * are acquired in undefined order, so it may cause a deadlock when used with - * other concurrent transactional updates. + * USE WITH CARE - if your cache has many entries then transaction will quickly become very heavy and slow. *

- * If write-through is enabled, the values will be removed from {@link CacheStore} - * via @link CacheStore#removeAll(Transaction, Collection) method. + * If write-through is enabled, the values will be removed from {@link CacheStore} via {@link IgniteDataStreamer}. *

Transactions

- * This method is transactional and will enlist the entry into ongoing transaction - * if there is one. + * This method is not transactional. * * @throws IgniteCheckedException If remove failed. */