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 F09C51886D for ; Thu, 22 Oct 2015 10:47:13 +0000 (UTC) Received: (qmail 34948 invoked by uid 500); 22 Oct 2015 10:47:13 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 34846 invoked by uid 500); 22 Oct 2015 10:47:13 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 34634 invoked by uid 99); 22 Oct 2015 10:47:13 -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, 22 Oct 2015 10:47:13 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A3234E0A95; Thu, 22 Oct 2015 10:47:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: agoncharuk@apache.org To: commits@ignite.apache.org Date: Thu, 22 Oct 2015 10:47:25 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [13/50] [abbrv] ignite git commit: ignite-1.4.2 - review and minor changes. ignite-1.4.2 - review and minor changes. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/155edd8d Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/155edd8d Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/155edd8d Branch: refs/heads/ignite-1016 Commit: 155edd8d254fa56c4fcc1666fe014c116e649a39 Parents: 4ee154c Author: Alexey Goncharuk Authored: Mon Oct 12 12:41:59 2015 +0300 Committer: Alexey Goncharuk Committed: Mon Oct 12 12:41:59 2015 +0300 ---------------------------------------------------------------------- .../processors/cache/GridCacheIoManager.java | 9 +- .../GridDhtPartitionDemandMessage.java | 1 - .../GridDhtPartitionsExchangeFuture.java | 16 +- .../preloader/GridDhtPartitionsFullMessage.java | 1 - .../multijvm/IgniteCacheProcessProxy.java | 966 +------------------ .../Properties/AssemblyInfo.cs | 2 +- .../Apache.Ignite/Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- 9 files changed, 12 insertions(+), 989 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/155edd8d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java index ae3eb22..476a96c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java @@ -24,7 +24,6 @@ import java.util.Map; import java.util.UUID; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; @@ -57,8 +56,6 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPr import org.apache.ignite.internal.util.F0; import org.apache.ignite.internal.util.GridLeanSet; import org.apache.ignite.internal.util.GridSpinReadWriteLock; -import org.apache.ignite.internal.util.future.GridFinishedFuture; -import org.apache.ignite.internal.util.lang.GridPlainRunnable; import org.apache.ignite.internal.util.typedef.CI1; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.P1; @@ -99,9 +96,6 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter { /** Stopping flag. */ private boolean stopping; - /** Error flag. */ - private final AtomicBoolean startErr = new AtomicBoolean(); - /** Mutex. */ private final GridSpinReadWriteLock rw = new GridSpinReadWriteLock(); @@ -944,10 +938,9 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter { /** * @param nodeId Sender node ID. * @param cacheMsg Message. - * @throws IgniteCheckedException If failed. */ @SuppressWarnings({"ErrorNotRethrown", "unchecked"}) - private void unmarshall(UUID nodeId, GridCacheMessage cacheMsg) throws IgniteCheckedException { + private void unmarshall(UUID nodeId, GridCacheMessage cacheMsg) { if (cctx.localNodeId().equals(nodeId)) return; http://git-wip-us.apache.org/repos/asf/ignite/blob/155edd8d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java index 156c37f..848ad87 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java @@ -27,7 +27,6 @@ import org.apache.ignite.internal.GridDirectTransient; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.GridCacheMessage; import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; -import org.apache.ignite.internal.util.tostring.GridToStringInclude; import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType; import org.apache.ignite.plugin.extensions.communication.MessageReader; http://git-wip-us.apache.org/repos/asf/ignite/blob/155edd8d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java index eaa5584..77e47a7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java @@ -193,6 +193,9 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter implements IgniteCache { return async ? cache.withAsync() : cache; } } - - /** - * - */ - private static class GetConfigurationTask> extends CacheTaskAdapter { - /** Clazz. */ - private final Class clazz; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param clazz Clazz. - */ - public GetConfigurationTask(String cacheName, boolean async, Class clazz) { - super(cacheName, async); - this.clazz = clazz; - } - - /** {@inheritDoc} */ - @Override public C call() throws Exception { - return cache().getConfiguration(clazz); - } - } - - /** - * - */ - private static class LocalLoadCacheTask extends CacheTaskAdapter { - /** Predicate. */ - private final IgniteBiPredicate p; - - /** Args. */ - private final Object[] args; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param p P. - * @param args Args. - */ - public LocalLoadCacheTask(String cacheName, boolean async, IgniteBiPredicate p, Object[] args) { - super(cacheName, async); - this.p = p; - this.args = args; - } - - /** {@inheritDoc} */ - @Override public Void call() { - cache().localLoadCache(p, args); - - return null; - } - } - - /** - * - */ - private static class GetAndPutIfAbsentTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** Value. */ - private final V val; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - * @param val Value. - */ - public GetAndPutIfAbsentTask(String cacheName, boolean async, K key, V val) { - super(cacheName, async); - this.key = key; - this.val = val; - } - - /** {@inheritDoc} */ - @Override public V call() throws Exception { - return cache().getAndPutIfAbsent(key, val); - } - } - - /** - * - */ - private static class IsLocalLockedTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** By current thread. */ - private final boolean byCurrThread; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - * @param byCurrThread By current thread. - */ - public IsLocalLockedTask(String cacheName, boolean async, K key, boolean byCurrThread) { - super(cacheName, async); - this.key = key; - this.byCurrThread = byCurrThread; - } - - /** {@inheritDoc} */ - @Override public Boolean call() throws Exception { - return cache().isLocalLocked(key, byCurrThread); - } - } - - /** - * - */ - private static class LocalEntriesTask extends CacheTaskAdapter>> { - /** Peek modes. */ - private final CachePeekMode[] peekModes; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param peekModes Peek modes. - */ - public LocalEntriesTask(String cacheName, boolean async, CachePeekMode[] peekModes) { - super(cacheName, async); - this.peekModes = peekModes; - } - - /** {@inheritDoc} */ - @Override public Iterable> call() throws Exception { - Collection> res = new ArrayList<>(); - - for (Entry e : cache().localEntries(peekModes)) - res.add(e); - - return res; - } - } - - /** - * - */ - private static class LocalEvictTask extends CacheTaskAdapter { - /** Keys. */ - private final Collection keys; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param keys Keys. - */ - public LocalEvictTask(String cacheName, boolean async, Collection keys) { - super(cacheName, async); - this.keys = keys; - } - - /** {@inheritDoc} */ - @Override public Void call() { - cache().localEvict(keys); - - return null; - } - } - - /** - * - */ - private static class LocalPeekTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** Peek modes. */ - private final CachePeekMode[] peekModes; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - * @param peekModes Peek modes. - */ - public LocalPeekTask(String cacheName, boolean async, K key, CachePeekMode[] peekModes) { - super(cacheName, async); - this.key = key; - this.peekModes = peekModes; - } - - /** {@inheritDoc} */ - @Override public V call() throws Exception { - return cache().localPeek(key, peekModes); - } - } - - /** - * - */ - private static class SizeTask extends CacheTaskAdapter { - /** Peek modes. */ - private final CachePeekMode[] peekModes; - - /** Local. */ - private final boolean loc; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param peekModes Peek modes. - * @param loc Local. - */ - public SizeTask(String cacheName, boolean async, CachePeekMode[] peekModes, boolean loc) { - super(cacheName, async); - this.loc = loc; - this.peekModes = peekModes; - } - - /** {@inheritDoc} */ - @Override public Integer call() throws Exception { - return loc ? cache().localSize(peekModes) : cache().size(peekModes); - } - } - - /** - * - */ - private static class GetTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - */ - public GetTask(String cacheName, boolean async, K key) { - super(cacheName, async); - this.key = key; - } - - /** {@inheritDoc} */ - @Override public V call() throws Exception { - return cache().get(key); - } - } - - /** - * - */ - private static class RemoveAllTask extends CacheTaskAdapter { - /** - * @param cacheName Cache name. - * @param async Async. - */ - public RemoveAllTask(String cacheName, boolean async) { - super(cacheName, async); - } - - /** {@inheritDoc} */ - @Override public Void call() { - IgniteCache cache = cache(); - - cache.removeAll(); - - if (async) - cache.future().get(); - - return null; - } - } - - /** - * - */ - private static class PutTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** Value. */ - private final V val; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - * @param val Value. - */ - public PutTask(String cacheName, boolean async, K key, V val) { - super(cacheName, async); - this.key = key; - this.val = val; - } - - /** {@inheritDoc} */ - @Override public Void call() { - cache().put(key, val); - - return null; - } - } - - /** - * - */ - private static class ContainsKeyTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - */ - public ContainsKeyTask(String cacheName, boolean async, K key) { - super(cacheName, async); - this.key = key; - } - - /** {@inheritDoc} */ - @Override public Boolean call() throws Exception { - return cache().containsKey(key); - } - } - - /** - * - */ - private static class ClearTask extends CacheTaskAdapter { - /** - * @param cacheName Cache name. - * @param async Async. - */ - public ClearTask(String cacheName, boolean async) { - super(cacheName, async); - } - - /** {@inheritDoc} */ - @Override public Void call() { - cache().clear(); - - return null; - } - } - - /** - * - */ - private static class IteratorTask extends CacheTaskAdapter>> { - /** - * @param cacheName Cache name. - * @param async Async. - */ - public IteratorTask(String cacheName, boolean async) { - super(cacheName, async); - } - - /** {@inheritDoc} */ - @Override public Collection> call() throws Exception { - Collection> res = new ArrayList<>(); - - for (Entry o : cache()) - res.add(o); - - return res; - } - } - - /** - * - */ - private static class ReplaceTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** Value. */ - private final V val; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - * @param val Value. - */ - public ReplaceTask(String cacheName, boolean async, K key, V val) { - super(cacheName, async); - this.key = key; - this.val = val; - } - - /** {@inheritDoc} */ - @Override public Boolean call() throws Exception { - return cache().replace(key, val); - } - } - - /** - * - */ - private static class GetNameTask extends CacheTaskAdapter { - /** - * @param cacheName Cache name. - * @param async Async. - */ - public GetNameTask(String cacheName, boolean async) { - super(cacheName, async); - } - - /** {@inheritDoc} */ - @Override public String call() throws Exception { - return cache().getName(); - } - } - - /** - * - */ - private static class RemoveTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - */ - public RemoveTask(String cacheName, boolean async, K key) { - super(cacheName, async); - this.key = key; - } - - /** {@inheritDoc} */ - @Override public Boolean call() throws Exception { - return cache().remove(key); - } - } - - /** - * - */ - private static class PutAllTask extends CacheTaskAdapter { - /** Map. */ - private final Map map; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param map Map. - */ - public PutAllTask(String cacheName, boolean async, Map map) { - super(cacheName, async); - this.map = map; - } - - /** {@inheritDoc} */ - @Override public Void call() { - cache().putAll(map); - - return null; - } - } - - /** - * - */ - private static class RemoveAllKeysTask extends CacheTaskAdapter { - /** Keys. */ - private final Set keys; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param keys Keys. - */ - public RemoveAllKeysTask(String cacheName, boolean async, Set keys) { - super(cacheName, async); - this.keys = keys; - } - - /** {@inheritDoc} */ - @Override public Void call() { - cache().removeAll(keys); - - return null; - } - } - - /** - * - */ - private static class GetAllTask extends CacheTaskAdapter> { - /** Keys. */ - private final Set keys; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param keys Keys. - */ - public GetAllTask(String cacheName, boolean async, Set keys) { - super(cacheName, async); - this.keys = keys; - } - - /** {@inheritDoc} */ - @Override public Map call() throws Exception { - return cache().getAll(keys); - } - } - - /** - * - */ - private static class GetAllOutTxTask extends CacheTaskAdapter> { - /** Keys. */ - private final Set keys; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param keys Keys. - */ - public GetAllOutTxTask(String cacheName, boolean async, Set keys) { - super(cacheName, async); - this.keys = keys; - } - - /** {@inheritDoc} */ - @Override public Map call() throws Exception { - return cache().getAllOutTx(keys); - } - } - - /** - * - */ - private static class ContainsKeysTask extends CacheTaskAdapter { - /** Keys. */ - private final Set keys; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param keys Keys. - */ - public ContainsKeysTask(String cacheName, boolean async, Set keys) { - super(cacheName, async); - this.keys = keys; - } - - /** {@inheritDoc} */ - @Override public Boolean call() throws Exception { - return cache().containsKeys(keys); - } - } - - /** - * - */ - private static class GetAndPutTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** Value. */ - private final V val; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - * @param val Value. - */ - public GetAndPutTask(String cacheName, boolean async, K key, V val) { - super(cacheName, async); - this.key = key; - this.val = val; - } - - /** {@inheritDoc} */ - @Override public V call() throws Exception { - return cache().getAndPut(key, val); - } - } - - /** - * - */ - private static class PutIfAbsentTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** Value. */ - private final V val; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - * @param val Value. - */ - public PutIfAbsentTask(String cacheName, boolean async, K key, V val) { - super(cacheName, async); - this.key = key; - this.val = val; - } - - /** {@inheritDoc} */ - @Override public Boolean call() throws Exception { - return cache().putIfAbsent(key, val); - } - } - - /** - * - */ - private static class RemoveIfExistsTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** Old value. */ - private final V oldVal; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - * @param oldVal Old value. - */ - public RemoveIfExistsTask(String cacheName, boolean async, K key, V oldVal) { - super(cacheName, async); - this.key = key; - this.oldVal = oldVal; - } - - /** {@inheritDoc} */ - @Override public Boolean call() throws Exception { - return cache().remove(key, oldVal); - } - } - - /** - * - */ - private static class GetAndRemoveTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - */ - public GetAndRemoveTask(String cacheName, boolean async, K key) { - super(cacheName, async); - this.key = key; - } - - /** {@inheritDoc} */ - @Override public V call() throws Exception { - return cache().getAndRemove(key); - } - } - - /** - * - */ - private static class ReplaceIfExistsTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** Old value. */ - private final V oldVal; - - /** New value. */ - private final V newVal; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - * @param oldVal Old value. - * @param newVal New value. - */ - public ReplaceIfExistsTask(String cacheName, boolean async, K key, V oldVal, V newVal) { - super(cacheName, async); - this.key = key; - this.oldVal = oldVal; - this.newVal = newVal; - } - - /** {@inheritDoc} */ - @Override public Boolean call() throws Exception { - return cache().replace(key, oldVal, newVal); - } - } - - /** - * - */ - private static class GetAndReplaceTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** Value. */ - private final V val; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - * @param val Value. - */ - public GetAndReplaceTask(String cacheName, boolean async, K key, V val) { - super(cacheName, async); - this.key = key; - this.val = val; - } - - /** {@inheritDoc} */ - @Override public V call() throws Exception { - return cache().getAndReplace(key, val); - } - } - - /** - * - */ - private static class ClearKeyTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** Local. */ - private final boolean loc; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - */ - public ClearKeyTask(String cacheName, boolean async, boolean loc, K key) { - super(cacheName, async); - this.key = key; - this.loc = loc; - } - - /** {@inheritDoc} */ - @Override public Void call() { - if (loc) - cache().localClear(key); - else - cache().clear(key); - - return null; - } - } - - /** - * - */ - private static class ClearAllKeys extends CacheTaskAdapter { - /** Keys. */ - private final Set keys; - - /** Local. */ - private final boolean loc; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param keys Keys. - */ - public ClearAllKeys(String cacheName, boolean async, boolean loc, Set keys) { - super(cacheName, async); - this.keys = keys; - this.loc = loc; - } - - /** {@inheritDoc} */ - @Override public Void call() { - if (loc) - cache().localClearAll(keys); - else - cache().clearAll(keys); - - return null; - } - } - - /** - * - */ - private static class InvokeTask extends CacheTaskAdapter { - /** Key. */ - private final K key; - - /** Processor. */ - private final EntryProcessor processor; - - /** Args. */ - private final Object[] args; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param key Key. - * @param processor Processor. - * @param args Args. - */ - public InvokeTask(String cacheName, boolean async, K key, EntryProcessor processor, - Object[] args) { - super(cacheName, async); - this.args = args; - this.key = key; - this.processor = processor; - } - - /** {@inheritDoc} */ - @Override public R call() throws Exception { - return cache().invoke(key, processor, args); - } - } - - /** - * - */ - private static class InvokeAllTask extends CacheTaskAdapter>> { - /** Keys. */ - private final Set keys; - - /** Processor. */ - private final EntryProcessor processor; - - /** Args. */ - private final Object[] args; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param keys Keys. - * @param processor Processor. - * @param args Args. - */ - public InvokeAllTask(String cacheName, boolean async, Set keys, - EntryProcessor processor, Object[] args) { - super(cacheName, async); - this.args = args; - this.keys = keys; - this.processor = processor; - } - - /** {@inheritDoc} */ - @Override public Map> call() throws Exception { - return cache().invokeAll(keys, processor, args); - } - } - - /** - * - */ - private static class CloseTask extends CacheTaskAdapter { - /** - * @param cacheName Cache name. - * @param async Async. - */ - public CloseTask(String cacheName, boolean async) { - super(cacheName, async); - } - - /** {@inheritDoc} */ - @Override public Void call() { - cache().close(); - - return null; - } - } - - /** - * - */ - private static class DestroyTask extends CacheTaskAdapter { - /** - * @param cacheName Cache name. - * @param async Async. - */ - public DestroyTask(String cacheName, boolean async) { - super(cacheName, async); - } - - /** {@inheritDoc} */ - @Override public Void call() { - cache().destroy(); - - return null; - } - } - - /** - * - */ - private static class IsClosedTask extends CacheTaskAdapter { - /** - * @param cacheName Cache name. - * @param async Async. - */ - public IsClosedTask(String cacheName, boolean async) { - super(cacheName, async); - } - - /** {@inheritDoc} */ - @Override public Boolean call() throws Exception { - return cache().isClosed(); - } - } - - /** - * - */ - private static class UnwrapTask extends CacheTaskAdapter { - /** Clazz. */ - private final Class clazz; - - /** - * @param cacheName Cache name. - * @param async Async. - * @param clazz Clazz. - */ - public UnwrapTask(String cacheName, boolean async, Class clazz) { - super(cacheName, async); - this.clazz = clazz; - } - - /** {@inheritDoc} */ - @Override public R call() throws Exception { - return cache().unwrap(clazz); - } - } - - /** - * - */ - private static abstract class CacheTaskAdapter implements IgniteCallable { - /** Ignite. */ - @IgniteInstanceResource - protected Ignite ignite; - - /** Cache name. */ - protected final String cacheName; - - /** Async. */ - protected final boolean async; - - /** - * @param cacheName Cache name. - * @param async Async. - */ - public CacheTaskAdapter(String cacheName, boolean async) { - this.async = async; - this.cacheName = cacheName; - } - - /** - * Returns cache instance. - */ - protected IgniteCache cache() { - IgniteCache cache = ignite.cache(cacheName); - - return async ? cache.withAsync() : cache; - } - } -} +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/155edd8d/modules/platform/src/main/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs index 7425cb6..1876e24 100644 --- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs +++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -/* +/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. http://git-wip-us.apache.org/repos/asf/ignite/blob/155edd8d/modules/platform/src/main/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs b/modules/platform/src/main/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs index 198cfa6..03f7fb9 100644 --- a/modules/platform/src/main/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs +++ b/modules/platform/src/main/dotnet/Apache.Ignite/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -/* +/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. http://git-wip-us.apache.org/repos/asf/ignite/blob/155edd8d/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs index a45f421..22d74c9 100644 --- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests.TestDll/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -/* +/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. http://git-wip-us.apache.org/repos/asf/ignite/blob/155edd8d/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs index db88e3b..1ebcf24 100644 --- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -/* +/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership.