[23/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java index ede8115..405e29c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java @@ -40,8 +40,8 @@ import java.util.concurrent.*; import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.*; -import static org.apache.ignite.cache.GridCacheFlag.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheFlag.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; import static org.apache.ignite.internal.processors.cache.GridCacheOperation.*; /** @@ -111,10 +111,10 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter private long topVer; /** Optional filter. */ -private final IgnitePredicate>[] filter; +private final IgnitePredicate>[] filter; /** Write synchronization mode. */ -private final GridCacheWriteSynchronizationMode syncMode; +private final CacheWriteSynchronizationMode syncMode; /** If this future mapped to single node. */ private volatile Boolean single; @@ -182,7 +182,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter public GridNearAtomicUpdateFuture( GridCacheContext cctx, GridDhtAtomicCache cache, -GridCacheWriteSynchronizationMode syncMode, +CacheWriteSynchronizationMode syncMode, GridCacheOperation op, Collection keys, @Nullable Collection vals, @@ -193,7 +193,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter final boolean rawRetval, @Nullable GridCacheEntryEx cached, @Nullable ExpiryPolicy expiryPlc, -final IgnitePredicate>[] filter, +final IgnitePredicate>[] filter, UUID subjId, int taskNameHash ) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java index d1f2692..99907a4 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java @@ -64,7 +64,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage im private long topVer; /** Write synchronization mode. */ -private GridCacheWriteSynchronizationMode syncMode; +private CacheWriteSynchronizationMode syncMode; /** Update operation. */ private GridCacheOperation op; @@ -115,7 +115,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage im /** Filter. */ @GridDirectTransient -private IgnitePredicate>[] filter; +private IgnitePredicate>[] filter; /** Filter bytes. */ private byte[][] filterBytes; @@ -168,13 +168,13 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage im boolean fastMap, @Nullable GridCacheVersion updateVer, long topVer, -GridCacheWriteSynchronizationMode syncMode, +CacheWriteSynchronizationMode syncMode, GridCacheOperation op, boolean retval, boolean forceTransformBackups, @Nullable ExpiryPolicy expiryPlc, @Nullable Object[] invokeArgs, -@Nullable IgnitePredicate>[] filter, +@Nullable IgnitePredicate>[] filter, @Nullable UUID subjId, int taskNameHash ) { @@ -263,7 +263,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage im /** * @return Cache write synchronization mode. */ -public GridCacheWriteSynchronizationMode writeSynchronizationMode() { +public CacheWriteSynchronizationMode writeSynchronizationMode() { return syncMode; } @@ -284,7 +2
[36/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/GridCacheProjection.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/GridCacheProjection.java b/modules/core/src/main/java/org/apache/ignite/cache/GridCacheProjection.java deleted file mode 100644 index d3a7517..000 --- a/modules/core/src/main/java/org/apache/ignite/cache/GridCacheProjection.java +++ /dev/null @@ -1,1912 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache; - -import org.apache.ignite.*; -import org.apache.ignite.cache.query.*; -import org.apache.ignite.cache.store.*; -import org.apache.ignite.cluster.*; -import org.apache.ignite.lang.*; -import org.apache.ignite.transactions.*; -import org.jetbrains.annotations.*; - -import java.sql.*; -import java.util.*; -import java.util.Date; -import java.util.concurrent.*; - -/** - * This interface provides a rich API for working with distributed caches. It includes the following - * main functionality: - * - * - * Various {@code 'get(..)'} methods to synchronously or asynchronously get values from cache. - * All {@code 'get(..)'} methods are transactional and will participate in an ongoing transaction - * if there is one. - * - * - * Various {@code 'put(..)'}, {@code 'putIfAbsent(..)'}, and {@code 'replace(..)'} methods to - * synchronously or asynchronously put single or multiple entries into cache. - * All these methods are transactional and will participate in an ongoing transaction - * if there is one. - * - * - * Various {@code 'remove(..)'} methods to synchronously or asynchronously remove single or multiple keys - * from cache. All {@code 'remove(..)'} methods are transactional and will participate in an ongoing transaction - * if there is one. - * - * - * Various {@code 'contains(..)'} method to check if cache contains certain keys or values locally. - * - * - * Various {@code 'forEach(..)'}, {@code 'forAny(..)'}, and {@code 'reduce(..)'} methods to visit - * every local cache entry within this projection. - * - * - * Various {@code flagsOn(..)'}, {@code 'flagsOff(..)'}, and {@code 'projection(..)'} methods to - * set specific flags and filters on a cache projection. - * - * - * Methods like {@code 'keySet(..)'}, {@code 'values(..)'}, and {@code 'entrySet(..)'} to provide - * views on cache keys, values, and entries. - * - * - * Various {@code 'peek(..)'} methods to peek at values in global or transactional memory, swap - * storage, or persistent storage. - * - * - * Various {@code 'reload(..)'} methods to reload latest values from persistent storage. - * - * - * Various {@code 'promote(..)'} methods to load specified keys from swap storage into - * global cache memory. - * - * - * Various {@code 'lock(..)'}, {@code 'unlock(..)'}, and {@code 'isLocked(..)'} methods to acquire, release, - * and check on distributed locks on a single or multiple keys in cache. All locking methods - * are not transactional and will not enlist keys into ongoing transaction, if any. - * - * - * Various {@code 'clear(..)'} methods to clear elements from cache, and optionally from - * swap storage. All {@code 'clear(..)'} methods are not transactional and will not enlist cleared - * keys into ongoing transaction, if any. - * - * - * Various {@code 'evict(..)'} methods to evict elements from cache, and optionally store - * them in underlying swap storage for later access. All {@code 'evict(..)'} methods are not - * transactional and will not enlist evicted keys into ongoing transaction, if any. - * - * - * Various {@code 'txStart(..)'} methods to perform various cache - * operations within a transaction (see {@link IgniteTx} for more information). - * - * - * {@link #queries()} method to get an instance of {@link org.apache.ignite.cache.query.GridCacheQueries} service for working - * with distributed cache queries. - * - * - * Various {@code 'gridProjection(..)'} methods which provide {@link org.apache.ignite.cluster.ClusterGroup} only - * for nodes on which given k
[18/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java index d356c6e..89baa85 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.cache.affinity.*; -import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.testframework.junits.common.*; import java.util.*; @@ -31,16 +30,16 @@ public class GridCacheAffinityMapperSelfTest extends GridCommonAbstractTest { * */ public void testMethodAffinityMapper() { -GridCacheAffinityKeyMapper mapper = +CacheAffinityKeyMapper mapper = new GridCacheDefaultAffinityKeyMapper(); -List> keys = new ArrayList<>(); +List> keys = new ArrayList<>(); for (int i = 1; i <= 10; i++) -keys.add(new GridCacheAffinityKey<>(i, Integer.toString(i))); +keys.add(new CacheAffinityKey<>(i, Integer.toString(i))); for (int i = 1; i <= 10; i++) { -GridCacheAffinityKey key = keys.get(i - 1); +CacheAffinityKey key = keys.get(i - 1); Object mapped = mapper.affinityKey(key); @@ -55,7 +54,7 @@ public class GridCacheAffinityMapperSelfTest extends GridCommonAbstractTest { * */ public void testFieldAffinityMapper() { -GridCacheAffinityKeyMapper mapper = +CacheAffinityKeyMapper mapper = new GridCacheDefaultAffinityKeyMapper(); List> keys = new ArrayList<>(); @@ -79,7 +78,7 @@ public class GridCacheAffinityMapperSelfTest extends GridCommonAbstractTest { * */ public void testFieldAffinityMapperWithWrongClass() { -GridCacheAffinityKeyMapper mapper = +CacheAffinityKeyMapper mapper = new GridCacheDefaultAffinityKeyMapper(); FieldNoAffinityKey key = new FieldNoAffinityKey(); @@ -102,7 +101,7 @@ public class GridCacheAffinityMapperSelfTest extends GridCommonAbstractTest { private K key; /** Affinity key. */ -@GridCacheAffinityKeyMapped +@CacheAffinityKeyMapped private Object affKey; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java index a6b96e9..7e52b63 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java @@ -37,7 +37,7 @@ import org.apache.ignite.testframework.junits.common.*; import java.util.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Affinity routing tests. @@ -272,7 +272,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { */ private static class FieldAffinityJob implements IgniteCallable { /** Affinity key. */ -@GridCacheAffinityKeyMapped +@CacheAffinityKeyMapped @GridToStringInclude private Object affKey; @@ -305,7 +305,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { if (log.isDebugEnabled()) log.debug("Running job [node=" + ignite.cluster().localNode().id() + ", job=" + this + "]"); -GridCacheAffinity aff = ignite.cache(null).affinity(); +CacheAffinity aff = ignite.cache(null).affinity(); return F.eqNodes(ignite.cluster().localNode(), aff.mapKeyToNode(affKey)); } @@ -346,7 +346,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { /** * @return Affinity key. */ -@GridCacheAffinityKeyMapped +@CacheAffinityKeyMapped public Object affinityKey() { return affKey; } @@ -361,7 +3
[42/56] [abbrv] incubator-ignite git commit: # ignite-63
# ignite-63 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/cafee25f Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/cafee25f Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/cafee25f Branch: refs/heads/ignite-94 Commit: cafee25f9ff86e0578520d2ce761bd4c68af94dc Parents: a4065d1 Author: sboikov Authored: Fri Jan 23 15:22:34 2015 +0300 Committer: sboikov Committed: Fri Jan 23 15:23:56 2015 +0300 -- examples/config/example-cache.xml |2 +- .../examples/datagrid/CacheAffinityExample.java |6 +- .../examples/datagrid/CacheApiExample.java | 20 +- .../datagrid/CacheContinuousQueryExample.java | 14 +- .../datagrid/CacheDataLoaderExample.java|2 +- .../examples/datagrid/CacheEventsExample.java |2 +- .../datagrid/CachePopularNumbersExample.java|4 +- .../examples/datagrid/CachePutGetExample.java |4 +- .../examples/datagrid/CacheQueryExample.java| 72 +- .../datagrid/CacheTransactionExample.java |6 +- .../datastructures/CacheAtomicLongExample.java |2 +- .../CacheAtomicReferenceExample.java|4 +- .../CacheAtomicSequenceExample.java |4 +- .../CacheAtomicStampedExample.java |4 +- .../CacheCountDownLatchExample.java |4 +- .../datastructures/CacheQueueExample.java |8 +- .../datastructures/CacheSetExample.java |8 +- .../HibernateL2CacheExampleNodeStartup.java |2 +- .../starschema/CacheStarSchemaExample.java | 22 +- .../datagrid/starschema/DimProduct.java |4 +- .../examples/datagrid/starschema/DimStore.java |4 +- .../datagrid/starschema/FactPurchase.java |8 +- .../datagrid/store/CacheStoreExample.java |2 +- .../store/CacheStoreLoadDataExample.java|4 +- .../store/dummy/CacheDummyPersonStore.java |7 +- .../client/memcache/MemcacheRestExample.java|4 +- .../MemcacheRestExampleNodeStartup.java |6 +- .../examples/ScalarCacheAffinityExample1.scala | 10 +- .../ScalarCacheAffinitySimpleExample.scala |4 +- .../scalar/examples/ScalarCacheExample.scala|4 +- .../examples/ScalarCacheQueryExample.scala | 16 +- .../examples/ScalarSnowflakeSchemaExample.scala |8 +- .../ClientAbstractMultiThreadedSelfTest.java|6 +- .../ignite/client/ClientPutPortableTask.java|2 +- .../client/ClientTopologyCacheSelfTest.java |2 +- .../client/impl/ClientCacheFlagsCodecTest.java |8 +- .../impl/ClientPartitionAffinitySelfTest.java | 10 +- .../ClientAbstractMultiNodeSelfTest.java|6 +- .../integration/ClientAbstractSelfTest.java | 20 +- .../rest/AbstractRestProcessorSelfTest.java |2 +- .../rest/RestBinaryProtocolSelfTest.java|2 +- .../rest/RestMemcacheProtocolSelfTest.java |2 +- .../processors/rest/RestProcessorTest.java |2 +- .../rest/TaskCommandHandlerSelfTest.java|2 +- .../ignite/jdbc/JdbcComplexQuerySelfTest.java | 26 +- .../ignite/jdbc/JdbcEmptyCacheSelfTest.java |2 +- .../ignite/jdbc/JdbcLocalCachesSelfTest.java|8 +- .../ignite/jdbc/JdbcMetadataSelfTest.java | 22 +- .../jdbc/JdbcPreparedStatementSelfTest.java | 34 +- .../ignite/jdbc/JdbcResultSetSelfTest.java | 40 +- .../ignite/jdbc/JdbcStatementSelfTest.java | 12 +- .../clients/src/test/resources/spring-cache.xml |2 +- .../src/test/resources/spring-server-node.xml | 10 +- .../test/resources/spring-server-ssl-node.xml | 10 +- .../src/main/java/org/apache/ignite/Ignite.java |6 +- .../apache/ignite/IgniteBasicWarmupClosure.java | 30 +- .../java/org/apache/ignite/IgniteCache.java | 32 +- .../java/org/apache/ignite/IgniteCluster.java |4 +- .../org/apache/ignite/IgniteDataLoader.java |2 +- .../java/org/apache/ignite/IgnitePortables.java | 14 +- .../java/org/apache/ignite/cache/Cache.java | 278 +++ .../ignite/cache/CacheAtomicWriteOrderMode.java |8 +- .../apache/ignite/cache/CacheConfiguration.java | 126 +- .../ignite/cache/CacheDistributionMode.java | 69 + .../org/apache/ignite/cache/CacheEntry.java | 621 ++ .../apache/ignite/cache/CacheEntryEvent.java|4 +- .../java/org/apache/ignite/cache/CacheFlag.java | 110 + .../apache/ignite/cache/CacheFlagException.java | 67 + .../apache/ignite/cache/CacheInterceptor.java | 120 ++ .../ignite/cache/CacheInterceptorAdapter.java | 52 + .../org/apache/ignite/cache/CacheMBean.java | 295 +++ .../apache/ignite/cache/CacheMemoryMode.java| 59 + .../org/apache/ignite/cache/CacheMetrics.java | 103 + .../java/org/apache/ignite/cache/CacheMode.java |4 +- .../java/org/apache/ignite/c
[07/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java index 37f6c90..925e829 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java @@ -33,7 +33,7 @@ import java.util.*; import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; import static org.apache.ignite.transactions.IgniteTxConcurrency.*; import static org.apache.ignite.transactions.IgniteTxIsolation.*; @@ -83,10 +83,10 @@ public class GridCacheDistributedEvictionsSelfTest extends GridCommonAbstractTes cc.setSwapEnabled(false); - cc.setWriteSynchronizationMode(GridCacheWriteSynchronizationMode.FULL_SYNC); + cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); // Set only DHT policy, leave default near policy. -cc.setEvictionPolicy(new GridCacheFifoEvictionPolicy<>(10)); +cc.setEvictionPolicy(new CacheFifoEvictionPolicy<>(10)); cc.setEvictSynchronized(evictSync); cc.setEvictNearSynchronized(evictNearSync); cc.setEvictSynchronizedKeyBufferSize(1); @@ -167,7 +167,7 @@ public class GridCacheDistributedEvictionsSelfTest extends GridCommonAbstractTes Ignite g = startGrid(0); -final GridCache cache = g.cache(null); +final Cache cache = g.cache(null); for (int i = 1; i < 20; i++) { cache.putx(i * gridCnt, i * gridCnt); @@ -183,7 +183,7 @@ public class GridCacheDistributedEvictionsSelfTest extends GridCommonAbstractTes Ignite ignite = grid(0); -final GridCache cache = ignite.cache(null); +final Cache cache = ignite.cache(null); // Put 1 entry to primary node. cache.putx(0, 0); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java index 25bfc7a..66e7cce 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java @@ -19,11 +19,12 @@ package org.apache.ignite.internal.processors.cache.eviction; import org.apache.ignite.*; import org.apache.ignite.cache.*; +import org.apache.ignite.cache.Cache; import org.apache.ignite.cache.store.*; import org.apache.ignite.configuration.*; import org.apache.ignite.transactions.*; -import org.apache.ignite.cache.eviction.GridCacheEvictionPolicy; -import org.apache.ignite.cache.eviction.fifo.GridCacheFifoEvictionPolicy; +import org.apache.ignite.cache.eviction.CacheEvictionPolicy; +import org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy; import org.apache.ignite.cache.store.CacheStore; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; @@ -32,7 +33,6 @@ import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import javax.cache.*; import javax.cache.configuration.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; @@ -45,10 +45,10 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** */ -private GridCacheEvictionPolicy plc; +private CacheEvictionPolicy plc; /** */ -private GridCacheEvictionPolicy nearPlc; +private CacheEvictionPolicy nearPlc; /** Test store. */ private CacheStore testStore; @@ -77,8 +77,8 @@ public abstra
[15/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java index 470030a..14247b7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java @@ -32,7 +32,7 @@ import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; /** * Test for cache swap preloading. @@ -61,7 +61,7 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest { CacheConfiguration cacheCfg = defaultCacheConfiguration(); - cacheCfg.setWriteSynchronizationMode(GridCacheWriteSynchronizationMode.FULL_SYNC); + cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); cacheCfg.setSwapEnabled(true); cacheCfg.setCacheMode(cacheMode); cacheCfg.setPreloadMode(SYNC); @@ -96,7 +96,7 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest { try { startGrid(0); -GridCache cache = grid(0).cache(null); +Cache cache = grid(0).cache(null); // Populate. for (int i = 0; i < ENTRY_CNT; i++) @@ -154,7 +154,7 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest { try { startGrid(0); -final GridCache cache = grid(0).cache(null); +final Cache cache = grid(0).cache(null); assertNotNull(cache); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java index 1cccdc0..902b45e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java @@ -32,7 +32,6 @@ import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.testframework.junits.common.*; -import javax.cache.*; import javax.cache.configuration.*; import java.util.*; import java.util.concurrent.*; @@ -40,7 +39,7 @@ import java.util.concurrent.*; import static java.util.concurrent.TimeUnit.*; import static org.apache.ignite.events.IgniteEventType.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Test that swap is released after entry is reloaded. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java index a61c24c..cffcf6e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java @@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.*; import org.apache.ignite.cache.*; -import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.lang.*; import org.apache.ignite.internal.processors.cache.transactions.*; import org.apache.ignite.internal.processors.dr.*; @@ -116,7 +115,7 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter impleme } /** {@inheritDoc} */ -@Nullable @Override public GridCacheEntry evictWrap() { +@Nullable @Override public CacheEntry evictWrap() { return null; } @@ -337,12 +336,12 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter impleme
[10/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java index b097f25..5ab4365 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java @@ -35,8 +35,8 @@ public class GridCachePartitionedTxOriginatingNodeFailureSelfTest extends private static final int BACKUP_CNT = 2; /** {@inheritDoc} */ -@Override protected GridCacheDistributionMode distributionMode() { -return GridCacheDistributionMode.NEAR_PARTITIONED; +@Override protected CacheDistributionMode distributionMode() { +return CacheDistributionMode.NEAR_PARTITIONED; } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java index ea586ca..28e5c4b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java @@ -33,7 +33,7 @@ import org.apache.ignite.testframework.junits.common.*; import java.util.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; import static org.apache.ignite.events.IgniteEventType.*; /** @@ -62,7 +62,7 @@ public class GridCachePartitionedUnloadEventsSelfTest extends GridCommonAbstract CacheConfiguration cacheCfg = defaultCacheConfiguration(); cacheCfg.setCacheMode(PARTITIONED); cacheCfg.setPreloadMode(SYNC); -cacheCfg.setAffinity(new GridCacheConsistentHashAffinityFunction(false, 10)); +cacheCfg.setAffinity(new CacheConsistentHashAffinityFunction(false, 10)); cacheCfg.setBackups(0); return cacheCfg; } @@ -75,7 +75,7 @@ public class GridCachePartitionedUnloadEventsSelfTest extends GridCommonAbstract Collection allKeys = new ArrayList<>(100); -GridCache cache = g1.cache(null); +Cache cache = g1.cache(null); for (int i = 0; i < 100; i++) { cache.put(i, "val"); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteTxConsistencyColocatedRestartSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteTxConsistencyColocatedRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteTxConsistencyColocatedRestartSelfTest.java index 8b9dfe0..dea3855 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteTxConsistencyColocatedRestartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteTxConsistencyColocatedRestartSelfTest.java @@ -30,7 +30,7 @@ public class IgniteTxConsistencyColocatedRestartSelfTest extends IgniteTxConsist } /** {@inheritDoc} */ -@Override protected GridCacheDistributionMode partitionDistributionMode() { -return GridCacheDistributionMode.PARTITIONED_ONLY; +@Override protected CacheDistributionMode partitionDistributionMode() { +return CacheDistributionMode.PARTITIONED_ONLY; } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteTxReentryColocatedSelfTest.java -- diff --git a/modules/core/src/
[13/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSequenceApiSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSequenceApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSequenceApiSelfTest.java index 6f4cd19..792a896 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSequenceApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSequenceApiSelfTest.java @@ -22,7 +22,7 @@ import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.datastructures.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Cache sequence basic tests. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceApiSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceApiSelfTest.java index 9ca5199..c502179 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceApiSelfTest.java @@ -22,8 +22,8 @@ import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.datastructures.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * AtomicReference basic tests. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceMultiNodeTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceMultiNodeTest.java index 32504df..7d268b0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceMultiNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceMultiNodeTest.java @@ -22,7 +22,7 @@ import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.datastructures.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * AtomicReference and AtomicStamped multi node tests. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java index 65e9c13..7810c6f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMulti
[49/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java index 3ff7c94..1efc144 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java @@ -71,7 +71,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @param c Test closure. * @throws Exception In case of error. */ -private void runTest(final IgniteInClosure> c) throws Exception { +private void runTest(final IgniteInClosure> c) throws Exception { final IgniteFuture fut1 = GridTestUtils.runMultiThreadedAsync(new CAX() { @Override public void applyx() throws IgniteCheckedException { while (true) { @@ -92,7 +92,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid IgniteFuture fut2 = GridTestUtils.runMultiThreadedAsync(new CA() { @Override public void apply() { -Cache cache = cache(); +GridCache cache = cache(); while (!fut1.isDone()) if (guard.get()) @@ -151,8 +151,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsKey() throws Exception { -runTest(new CI1>() { -@Override public void apply(Cache cache) { +runTest(new CI1>() { +@Override public void apply(GridCache cache) { assert cache.containsKey("key" + random()); assert !cache.containsKey("wrongKey"); } @@ -163,8 +163,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsKeyFiltered() throws Exception { -runTest(new CI1>() { -@Override public void apply(Cache cache) { +runTest(new CI1>() { +@Override public void apply(GridCache cache) { assert cache.projection(F.cacheHasPeekValue()).containsKey("key"); assert !cache.projection(F.cacheNoPeekValue()).containsKey("key" + random()); } @@ -175,8 +175,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsValue() throws Exception { -runTest(new CI1>() { -@Override public void apply(Cache cache) { +runTest(new CI1>() { +@Override public void apply(GridCache cache) { assert cache.containsValue(random()); assert !cache.containsValue(-1); } @@ -187,8 +187,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsValueFiltered() throws Exception { -runTest(new CI1>() { -@Override public void apply(Cache cache) { +runTest(new CI1>() { +@Override public void apply(GridCache cache) { assert cache.projection(F.cacheHasPeekValue()).containsValue(random()); assert !cache.projection(F.cacheNoPeekValue()).containsValue(random()); } @@ -199,8 +199,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testForAll() throws Exception { -runTest(new CI1>() { -@Override public void apply(Cache cache) { +runTest(new CI1>() { +@Override public void apply(GridCache cache) { assert cache.forAll(new P1>() { @Override public boolean apply(CacheEntry e) { Integer val = e.peek(); @@ -216,8 +216,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testGet() throws Exception { -runTest(new CIX1>() { -@Override public void applyx(Cache cache) throws IgniteCheckedException { +runTest(new CIX1>() { +@Override public void applyx(GridCache cache) throws IgniteCheckedException { int rnd = random(); assert cache.get("key" + rnd) == r
[20/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java index 6a28a73..70216b2 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java @@ -58,7 +58,7 @@ public class VisorCacheCompactTask extends VisorOneNodeTask, Map> run(Set names) throws IgniteCheckedException { final Map> res = new HashMap<>(); -for(GridCache cache : g.cachesx()) { +for(Cache cache : g.cachesx()) { String cacheName = cache.name(); if (names.contains(cacheName)) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java index 3071178..3e3fd08 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java @@ -40,7 +40,7 @@ public class VisorCacheConfiguration implements Serializable { private CacheMode mode; /** Distribution mode. */ -private GridCacheDistributionMode distributionMode; +private CacheDistributionMode distributionMode; /** Cache atomicity mode */ private CacheAtomicityMode atomicityMode; @@ -55,7 +55,7 @@ public class VisorCacheConfiguration implements Serializable { private boolean eagerTtl; /** Write synchronization mode. */ -private GridCacheWriteSynchronizationMode writeSynchronizationMode; +private CacheWriteSynchronizationMode writeSynchronizationMode; /** Sequence reserve size. */ private int seqReserveSize; @@ -100,7 +100,7 @@ public class VisorCacheConfiguration implements Serializable { private int pessimisticTxLogLinger; /** Memory mode. */ -private GridCacheMemoryMode memoryMode; +private CacheMemoryMode memoryMode; /** Name of SPI to use for indexing. */ private String indexingSpiName; @@ -225,14 +225,14 @@ public class VisorCacheConfiguration implements Serializable { /** * @return Distribution mode. */ -public GridCacheDistributionMode distributionMode() { +public CacheDistributionMode distributionMode() { return distributionMode; } /** * @param distributionMode New distribution mode. */ -public void distributionMode(GridCacheDistributionMode distributionMode) { +public void distributionMode(CacheDistributionMode distributionMode) { this.distributionMode = distributionMode; } @@ -295,14 +295,14 @@ public class VisorCacheConfiguration implements Serializable { /** * @return Write synchronization mode. */ -public GridCacheWriteSynchronizationMode writeSynchronizationMode() { +public CacheWriteSynchronizationMode writeSynchronizationMode() { return writeSynchronizationMode; } /** * @param writeSynchronizationMode New write synchronization mode. */ -public void writeSynchronizationMode(GridCacheWriteSynchronizationMode writeSynchronizationMode) { +public void writeSynchronizationMode(CacheWriteSynchronizationMode writeSynchronizationMode) { this.writeSynchronizationMode = writeSynchronizationMode; } @@ -506,14 +506,14 @@ public class VisorCacheConfiguration implements Serializable { /** * @return Memory mode. */ -public GridCacheMemoryMode memoryMode() { +public CacheMemoryMode memoryMode() { return memoryMode; } /** * @param memoryMode New memory mode. */ -public void memoryMode(GridCacheMemoryMode memoryMode) { +public void memoryMode(CacheMemoryMode memoryMode) { this.memoryMode = memoryMode; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfiguration.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfigu
[33/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/GridCachePartitionFairAffinity.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/GridCachePartitionFairAffinity.java b/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/GridCachePartitionFairAffinity.java deleted file mode 100644 index 9f65dc7..000 --- a/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/GridCachePartitionFairAffinity.java +++ /dev/null @@ -1,805 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache.affinity.fair; - -import org.apache.ignite.cache.*; -import org.apache.ignite.cache.affinity.*; -import org.apache.ignite.cluster.*; -import org.apache.ignite.events.*; -import org.apache.ignite.lang.*; -import org.apache.ignite.internal.util.typedef.*; -import org.apache.ignite.internal.util.typedef.internal.*; - -import java.io.*; -import java.util.*; - -/** - * Fair affinity function which tries to ensure that all nodes get equal number of partitions with - * minimum amount of reassignments between existing nodes. - * - * Cache affinity can be configured for individual caches via {@link CacheConfiguration#getAffinity()} method. - */ -@GridCacheCentralizedAffinityFunction -public class GridCachePartitionFairAffinity implements GridCacheAffinityFunction { -/** Default partition count. */ -public static final int DFLT_PART_CNT = 256; - -/** */ -private static final long serialVersionUID = 0L; - -/** Ascending comparator. */ -private static final Comparator ASC_CMP = new PartitionSetComparator(false); - -/** Descending comparator. */ -private static final Comparator DESC_CMP = new PartitionSetComparator(true); - -/** */ -private int parts; - -/** - * Creates fair affinity with default partition count. - */ -public GridCachePartitionFairAffinity() { -this(DFLT_PART_CNT); -} - -/** - * @param parts Number of partitions. - */ -public GridCachePartitionFairAffinity(int parts) { -this.parts = parts; -} - -/** {@inheritDoc} */ -@Override public List> assignPartitions(GridCacheAffinityFunctionContext ctx) { -List topSnapshot = ctx.currentTopologySnapshot(); - -if (topSnapshot.size() == 1) { -ClusterNode primary = topSnapshot.get(0); - -List> assignments = new ArrayList<>(parts); - -for (int i = 0; i < parts; i++) -assignments.add(Collections.singletonList(primary)); - -return assignments; -} - -IgniteBiTuple>, Map> cp = createCopy(ctx, topSnapshot); - -List> assignment = cp.get1(); - -int tiers = Math.min(ctx.backups() + 1, topSnapshot.size()); - -// Per tier pending partitions. -Map> pendingParts = new HashMap<>(); - -FullAssignmentMap fullMap = new FullAssignmentMap(tiers, assignment, topSnapshot); - -for (int tier = 0; tier < tiers; tier++) { -// Check if this is a new tier and add pending partitions. -Queue pending = pendingParts.get(tier); - -for (int part = 0; part < parts; part++) { -if (fullMap.assignments.get(part).size() < tier + 1) { -if (pending == null) { -pending = new LinkedList<>(); - -pendingParts.put(tier, pending); -} - -if (!pending.contains(part)) -pending.add(part); - -} -} - -// Assign pending partitions, if any. -assignPending(tier, pendingParts, fullMap, topSnapshot); - -// Balance assignments. -balance(tier, pendingParts, fullMap, topSnapshot); -} - -return fullMap.assignments; -} - -/** {@inheritDoc} */ -@Override public void reset() { -// No-op. -} - -/** {@inheritDoc} */ -@Override public int partitions() { -return parts; -} - -/** {@inherit
[27/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java index dc3d929..ccc8af7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java @@ -59,7 +59,7 @@ import java.util.concurrent.locks.*; import static java.util.Collections.*; import static org.apache.ignite.IgniteSystemProperties.*; import static org.apache.ignite.events.IgniteEventType.*; -import static org.apache.ignite.cache.GridCacheFlag.*; +import static org.apache.ignite.cache.CacheFlag.*; import static org.apache.ignite.cache.GridCachePeekMode.*; import static org.apache.ignite.transactions.IgniteTxConcurrency.*; import static org.apache.ignite.transactions.IgniteTxIsolation.*; @@ -71,7 +71,7 @@ import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKe * Adapter for different cache implementations. */ @SuppressWarnings("unchecked") -public abstract class GridCacheAdapter implements GridCache, +public abstract class GridCacheAdapter implements Cache, GridCacheProjectionEx, Externalizable { /** */ private static final long serialVersionUID = 0L; @@ -151,13 +151,13 @@ public abstract class GridCacheAdapter implements GridCache, protected IgniteLogger log; /** Queries impl. */ -private GridCacheQueries qry; +private CacheQueries qry; /** Data structures impl. */ -private GridCacheDataStructures dataStructures; +private CacheDataStructures dataStructures; /** Affinity impl. */ -private GridCacheAffinity aff; +private CacheAffinity aff; /** Whether this cache is GGFS data cache. */ private boolean ggfsDataCache; @@ -344,33 +344,33 @@ public abstract class GridCacheAdapter implements GridCache, public abstract GridCachePreloader preloader(); /** {@inheritDoc} */ -@Override public GridCacheQueries queries() { +@Override public CacheQueries queries() { return qry; } /** {@inheritDoc} */ -@Override public GridCacheAffinity affinity() { +@Override public CacheAffinity affinity() { return aff; } /** {@inheritDoc} */ -@Override public GridCacheDataStructures dataStructures() { +@Override public CacheDataStructures dataStructures() { return dataStructures; } /** {@inheritDoc} */ @SuppressWarnings({"unchecked", "RedundantCast"}) -@Override public GridCache cache() { -return (GridCache)this; +@Override public Cache cache() { +return (Cache)this; } /** {@inheritDoc} */ -@Override public Set flags() { +@Override public Set flags() { return F.asSet(ctx.forcedFlags()); } /** {@inheritDoc} */ -@Override public IgnitePredicate> predicate() { +@Override public IgnitePredicate> predicate() { return null; } @@ -389,7 +389,7 @@ public abstract class GridCacheAdapter implements GridCache, } /** {@inheritDoc} */ -@Override public GridCacheProjection flagsOn(@Nullable GridCacheFlag[] flags) { +@Override public CacheProjection flagsOn(@Nullable CacheFlag[] flags) { if (F.isEmpty(flags)) return this; @@ -406,12 +406,12 @@ public abstract class GridCacheAdapter implements GridCache, } /** {@inheritDoc} */ -@Override public GridCacheProjection flagsOff(@Nullable GridCacheFlag[] flags) { +@Override public CacheProjection flagsOff(@Nullable CacheFlag[] flags) { return this; } /** {@inheritDoc} */ -@Override public GridCacheProjection keepPortable() { +@Override public CacheProjection keepPortable() { GridCacheProjectionImpl prj = keepPortable0(); return new GridCacheProxyImpl<>((GridCacheContext)ctx, prj, prj); @@ -424,7 +424,7 @@ public abstract class GridCacheAdapter implements GridCache, */ public GridCacheProjectionImpl keepPortable0() { return new GridCacheProjectionImpl<>( -(GridCacheProjection)this, +(CacheProjection)this, (GridCacheContext)ctx, null, null, @@ -455,7 +455,7 @@ public abstract class GridCacheAdapter implements GridCache, /** {@inheritDoc} */ @SuppressWarnings({"unchecked", "RedundantCast"}) -@Override public GridCacheProjection projection( +@Override public CacheProjection projection( Class keyType, Class valType ) { @@ -472,7 +472,7 @@ public abstract class GridCacheAdapter implement
[22/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java index 9342c5d..f65017a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java @@ -30,18 +30,18 @@ import org.jetbrains.annotations.*; import java.util.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.internal.processors.cache.query.GridCacheQueryType.*; /** * Query adapter. */ -public class GridCacheQueryAdapter implements GridCacheQuery { +public class GridCacheQueryAdapter implements CacheQuery { /** */ private final GridCacheContext cctx; /** */ -private final IgnitePredicate> prjPred; +private final IgnitePredicate> prjPred; /** */ private final GridCacheQueryType type; @@ -103,7 +103,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { */ public GridCacheQueryAdapter(GridCacheContext cctx, GridCacheQueryType type, -@Nullable IgnitePredicate> prjPred, +@Nullable IgnitePredicate> prjPred, @Nullable String clsName, @Nullable String clause, @Nullable IgniteBiPredicate filter, @@ -153,7 +153,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { * @param taskHash Task hash. */ public GridCacheQueryAdapter(GridCacheContext cctx, -IgnitePredicate> prjPred, +IgnitePredicate> prjPred, GridCacheQueryType type, IgniteLogger log, int pageSize, @@ -191,7 +191,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { /** * @return cache projection filter. */ -@Nullable public IgnitePredicate> projectionFilter() { +@Nullable public IgnitePredicate> projectionFilter() { return prjPred; } @@ -261,7 +261,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { } /** {@inheritDoc} */ -@Override public GridCacheQuery pageSize(int pageSize) { +@Override public CacheQuery pageSize(int pageSize) { A.ensure(pageSize > 0, "pageSize > 0"); this.pageSize = pageSize; @@ -277,7 +277,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { } /** {@inheritDoc} */ -@Override public GridCacheQuery timeout(long timeout) { +@Override public CacheQuery timeout(long timeout) { A.ensure(timeout >= 0, "timeout >= 0"); this.timeout = timeout; @@ -293,7 +293,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { } /** {@inheritDoc} */ -@Override public GridCacheQuery keepAll(boolean keepAll) { +@Override public CacheQuery keepAll(boolean keepAll) { this.keepAll = keepAll; return this; @@ -307,7 +307,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { } /** {@inheritDoc} */ -@Override public GridCacheQuery includeBackups(boolean incBackups) { +@Override public CacheQuery includeBackups(boolean incBackups) { this.incBackups = incBackups; return this; @@ -321,7 +321,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { } /** {@inheritDoc} */ -@Override public GridCacheQuery enableDedup(boolean dedup) { +@Override public CacheQuery enableDedup(boolean dedup) { this.dedup = dedup; return this; @@ -335,7 +335,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { } /** {@inheritDoc} */ -@Override public GridCacheQuery projection(ClusterGroup prj) { +@Override public CacheQuery projection(ClusterGroup prj) { this.prj = prj; return this; @@ -384,21 +384,21 @@ public class GridCacheQueryAdapter implements GridCacheQuery { } /** {@inheritDoc} */ -@Override public GridCacheQueryFuture execute(@Nullable Object... args) { +@Override public CacheQueryFuture execute(@Nullable Object... args) { return execute(null, null, args); } /** {@inheritDoc} */ -@Override public GridCacheQueryFuture execute(IgniteReducer rmtReducer, @Nullable Object... args) { +@Override public CacheQueryFuture execute(IgniteReducer rmtReducer, @Nullable Object... args) { return execute(rmtReducer, null, args); } /** {@inheritDoc} */ -@Override public GridCacheQueryFuture execute(Ignite
[52/56] [abbrv] incubator-ignite git commit: # ignite-63
# ignite-63 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/50d64b0a Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/50d64b0a Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/50d64b0a Branch: refs/heads/ignite-94 Commit: 50d64b0ab61e76a6f6a61b5dbb4069f2af24c592 Parents: 168d7d0 Author: sboikov Authored: Fri Jan 23 17:13:30 2015 +0400 Committer: sboikov Committed: Fri Jan 23 17:13:30 2015 +0400 -- .../scalar/examples/ScalarCacheAffinitySimpleExample.scala | 6 +++--- .../ignite/scalar/examples/ScalarCacheQueryExample.scala | 4 ++-- .../ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/50d64b0a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala -- diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala index dd62b9e..e3959a0 100644 --- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala +++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala @@ -43,7 +43,7 @@ object ScalarCacheAffinitySimpleExample extends App { private val NAME = "partitioned" /** Type alias. */ -type GridCache = GridCache[Int, String] +type Cache = GridCache[Int, String] /* * Note that in case of `LOCAL` configuration, @@ -65,7 +65,7 @@ object ScalarCacheAffinitySimpleExample extends App { * * @param c Cache to use. */ -private def visit(c: GridCache) { +private def visit(c: Cache) { (0 until KEY_CNT).foreach(i => grid$.compute().affinityRun(NAME, i, () => println("Co-located [key= " + i + ", value=" + c.peek(i) + ']')) @@ -77,7 +77,7 @@ object ScalarCacheAffinitySimpleExample extends App { * * @param c Cache to populate. */ -private def populate(c: GridCache) { +private def populate(c: Cache) { (0 until KEY_CNT).foreach(i => c += (i -> i.toString)) } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/50d64b0a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala -- diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala index 4ac6303..cda85d9 100644 --- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala +++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala @@ -15,13 +15,13 @@ * limitations under the License. */ -package org.gridgain.scalar.examples +package org.apache.ignite.scalar.examples import org.apache.ignite.cache.{CacheMode, CacheFlag, CacheProjection} import org.apache.ignite.cache.affinity.CacheAffinityKey import org.gridgain.scalar._ import scalar._ -import org.apache.ignite._ +import org.apache.ignite.Ignite import CacheMode._ import java.util._ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/50d64b0a/examples/src/test/scala/org/apache/ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala -- diff --git a/examples/src/test/scala/org/apache/ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala b/examples/src/test/scala/org/apache/ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala index e29a063..f026747 100644 --- a/examples/src/test/scala/org/apache/ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala +++ b/examples/src/test/scala/org/apache/ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala @@ -17,6 +17,7 @@ package org.apache.ignite.scalar.tests.examples +import org.apache.ignite.scalar.examples.{ScalarCacheQueryExample, ScalarCacheAffinitySimpleExample} import org.gridgain.scalar.examples._ import org.gridgain.scalar.scalar import org.scalatest.junit.JUnitSuiteLike
[41/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java -- diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java index 1971b78..d4ad2ce 100644 --- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java +++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java @@ -55,7 +55,7 @@ public final class CacheAtomicSequenceExample { final String seqName = UUID.randomUUID().toString(); // Initialize atomic sequence in grid. -GridCacheAtomicSequence seq = g.cache(CACHE_NAME).dataStructures().atomicSequence(seqName, 0, true); +CacheAtomicSequence seq = g.cache(CACHE_NAME).dataStructures().atomicSequence(seqName, 0, true); // First value of atomic sequence on this node. long firstVal = seq.get(); @@ -96,7 +96,7 @@ public final class CacheAtomicSequenceExample { /** {@inheritDoc} */ @Override public void run() { try { -GridCacheAtomicSequence seq = Ignition.ignite().cache(cacheName).dataStructures(). +CacheAtomicSequence seq = Ignition.ignite().cache(cacheName).dataStructures(). atomicSequence(seqName, 0, true); for (int i = 0; i < RETRIES; i++) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java -- diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java index f049c8e..eb70edd 100644 --- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java +++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java @@ -58,7 +58,7 @@ public final class CacheAtomicStampedExample { String stamp = UUID.randomUUID().toString(); // Initialize atomic stamped in cache. -GridCacheAtomicStamped stamped = g.cache(CACHE_NAME).dataStructures(). +CacheAtomicStamped stamped = g.cache(CACHE_NAME).dataStructures(). atomicStamped(stampedName, val, stamp, true); System.out.println("Atomic stamped initial [value=" + stamped.value() + ", stamp=" + stamped.stamp() + ']'); @@ -119,7 +119,7 @@ public final class CacheAtomicStampedExample { /** {@inheritDoc} */ @Override public void run() { try { -GridCacheAtomicStamped stamped = Ignition.ignite().cache(cacheName).dataStructures(). +CacheAtomicStamped stamped = Ignition.ignite().cache(cacheName).dataStructures(). atomicStamped(stampedName, null, null, true); System.out.println("Atomic stamped [value=" + stamped.value() + ", stamp=" + stamped.stamp() + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java -- diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java index ba3a9f9..495d8ac 100644 --- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java +++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java @@ -55,7 +55,7 @@ public class CacheCountDownLatchExample { final String latchName = UUID.randomUUID().toString(); // Initialize count down latch in grid. -GridCacheCountDownLatch latch = g.cache(CACHE_NAME).dataStructures(). +CacheCountDownLatch latch = g.cache(CACHE_NAME).dataStructures(). countDownLatch(latchName, INITIAL_COUNT, false, true); System.out.println("Latch initial value: " + latch.count()); @@ -97,7 +97,7 @@ public class CacheCountDownLatchExample { /** {@inheritDoc} */ @Override public void run() { try { -GridCacheCountDownLatch latch = Ignition.ignite().cache(cacheName).dataStructures(). +
[19/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java index 4ff49d7..3ff7c94 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java @@ -71,7 +71,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @param c Test closure. * @throws Exception In case of error. */ -private void runTest(final IgniteInClosure> c) throws Exception { +private void runTest(final IgniteInClosure> c) throws Exception { final IgniteFuture fut1 = GridTestUtils.runMultiThreadedAsync(new CAX() { @Override public void applyx() throws IgniteCheckedException { while (true) { @@ -92,7 +92,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid IgniteFuture fut2 = GridTestUtils.runMultiThreadedAsync(new CA() { @Override public void apply() { -GridCache cache = cache(); +Cache cache = cache(); while (!fut1.isDone()) if (guard.get()) @@ -110,7 +110,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws IgniteCheckedException If failed. */ private void checkConsistency() throws IgniteCheckedException { -for (GridCacheEntry e : cache()) +for (CacheEntry e : cache()) for (int i = 1; i < gridCount(); i++) { Integer val = cache(i).get(e.getKey()); @@ -151,8 +151,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsKey() throws Exception { -runTest(new CI1>() { -@Override public void apply(GridCache cache) { +runTest(new CI1>() { +@Override public void apply(Cache cache) { assert cache.containsKey("key" + random()); assert !cache.containsKey("wrongKey"); } @@ -163,8 +163,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsKeyFiltered() throws Exception { -runTest(new CI1>() { -@Override public void apply(GridCache cache) { +runTest(new CI1>() { +@Override public void apply(Cache cache) { assert cache.projection(F.cacheHasPeekValue()).containsKey("key"); assert !cache.projection(F.cacheNoPeekValue()).containsKey("key" + random()); } @@ -175,8 +175,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsValue() throws Exception { -runTest(new CI1>() { -@Override public void apply(GridCache cache) { +runTest(new CI1>() { +@Override public void apply(Cache cache) { assert cache.containsValue(random()); assert !cache.containsValue(-1); } @@ -187,8 +187,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsValueFiltered() throws Exception { -runTest(new CI1>() { -@Override public void apply(GridCache cache) { +runTest(new CI1>() { +@Override public void apply(Cache cache) { assert cache.projection(F.cacheHasPeekValue()).containsValue(random()); assert !cache.projection(F.cacheNoPeekValue()).containsValue(random()); } @@ -199,10 +199,10 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testForAll() throws Exception { -runTest(new CI1>() { -@Override public void apply(GridCache cache) { -assert cache.forAll(new P1>() { -@Override public boolean apply(GridCacheEntry e) { +runTest(new CI1>() { +@Override public void apply(Cache cache) { +assert cache.forAll(new P1>() { +@Override public boolean apply(CacheEntry e) { Integer val
[25/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java index 70bd5d0..c5b1a46 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java @@ -72,11 +72,11 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx cctx; /** Queries impl. */ -private GridCacheQueries qry; +private CacheQueries qry; /** Flags. */ @GridToStringInclude -private Set flags; +private Set flags; /** Client ID which operates over this projection, if any, */ private UUID subjId; @@ -103,11 +103,11 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx parent, +CacheProjection parent, GridCacheContext cctx, @Nullable IgniteBiPredicate kvFilter, -@Nullable IgnitePredicate> entryFilter, -@Nullable Set flags, +@Nullable IgnitePredicate> entryFilter, +@Nullable Set flags, @Nullable UUID subjId, boolean keepPortable, @Nullable ExpiryPolicy expiryPlc) { @@ -119,9 +119,9 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx f = this.flags; +Set f = this.flags; this.flags = Collections.unmodifiableSet(f); @@ -157,7 +157,7 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx> entryFilter(boolean noNulls) { +IgnitePredicate> entryFilter(boolean noNulls) { return noNulls ? noNullEntryFilter : withNullEntryFilter; } @@ -190,9 +190,9 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx> and( -IgnitePredicate> filter, boolean noNulls) { -IgnitePredicate> entryFilter = entryFilter(noNulls); +IgnitePredicate> and( +IgnitePredicate> filter, boolean noNulls) { +IgnitePredicate> entryFilter = entryFilter(noNulls); if (filter == null) return entryFilter; @@ -249,9 +249,9 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx> and(@Nullable final IgnitePredicate>[] f1, +private IgnitePredicate> and(@Nullable final IgnitePredicate>[] f1, boolean nonNulls) { -IgnitePredicate> entryFilter = entryFilter(nonNulls); +IgnitePredicate> entryFilter = entryFilter(nonNulls); if (F.isEmpty(f1)) return entryFilter; @@ -264,8 +264,8 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx e, boolean noNulls) { -GridCacheFlag[] f = cctx.forceLocalRead(); +boolean isAll(CacheEntry e, boolean noNulls) { +CacheFlag[] f = cctx.forceLocalRead(); try { return F.isAll(e, entryFilter(noNulls)); @@ -285,7 +285,7 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx p = kvFilter(noNulls); if (p != null) { -GridCacheFlag[] f = cctx.forceLocalRead(); +CacheFlag[] f = cctx.forceLocalRead(); try { if (!p.apply(k, v)) @@ -344,9 +344,9 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx> visitor(final IgniteInClosure> vis) { -return new CI1>() { -@Override public void apply(GridCacheEntry e) { +private IgniteInClosure> visitor(final IgniteInClosure> vis) { +return new CI1>() { +@Override public void apply(CacheEntry e) { if (isAll(e, true)) vis.apply(e); } @@ -359,9 +359,9 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx> visitor(final IgnitePredicate> vis) { -return new P1>() { -@Override public boolean apply(GridCacheEntry e) { +private IgnitePredicate> visitor(final IgnitePredicate> vis) { +return new P1>() { +@Override public boolean apply(CacheEntry e) { // If projection filter didn't pass, go to the next element. // Otherwise, delegate to the visitor. return !isAll(e, true) || vis.apply(e); @@ -371,12 +371,12 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx GridCache cache() { -return (GridCache)cctx.cache(); +@Override public Cache cache() { +return (Cache)cctx.cache(); } /** {@inheritDoc} */ -@Override public GridCacheQueries queries() { +@Override public CacheQueries queries() { return qry; } @@ -407,7 +407,7 @@ public class GridCacheProjectionImpl implements Gr
[08/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java index 76745fe..e8f6dad 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.internal.processors.cache.distributed.near; import org.apache.ignite.cache.*; +import org.apache.ignite.cache.Cache; import org.apache.ignite.cache.store.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.distributed.*; @@ -28,12 +29,11 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.testframework.junits.common.*; -import javax.cache.*; import javax.cache.configuration.*; import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; import static org.apache.ignite.internal.processors.cache.distributed.GridCacheModuloAffinityFunction.*; /** @@ -47,13 +47,13 @@ public class GridCachePartitionedStorePutSelfTest extends GridCommonAbstractTest private static final AtomicInteger CNT = new AtomicInteger(0); /** */ -private GridCache cache1; +private Cache cache1; /** */ -private GridCache cache2; +private Cache cache2; /** */ -private GridCache cache3; +private Cache cache3; /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { @@ -136,7 +136,7 @@ public class GridCachePartitionedStorePutSelfTest extends GridCommonAbstractTest } /** {@inheritDoc} */ -@Override public void write(Cache.Entry e) { +@Override public void write(javax.cache.Cache.Entry e) { // No-op } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxConcurrentGetTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxConcurrentGetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxConcurrentGetTest.java index 0223cd7..fb2fe79 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxConcurrentGetTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxConcurrentGetTest.java @@ -22,7 +22,7 @@ import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Checks multithreaded put/get partitioned cache operations on one node. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java index ce92d57..4b653f8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java @@ -22,7 +22,7 @@ import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite
[09/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java index c3dd105..eeb1ff3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java @@ -34,10 +34,10 @@ import java.util.*; import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Checks that readers are properly handled. @@ -139,8 +139,8 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { Ignite g1 = grid(n1.id()); Ignite g2 = grid(n2.id()); -GridCache cache1 = g1.cache(null); -GridCache cache2 = g2.cache(null); +Cache cache1 = g1.cache(null); +Cache cache2 = g2.cache(null); // Store some values in cache. assertNull(cache1.put(1, "v1")); @@ -217,8 +217,8 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { ((GridKernal)g1).internalCache(null).preloader().request(F.asList(1, 2), 2).get(); ((GridKernal)g2).internalCache(null).preloader().request(F.asList(1, 2), 2).get(); -GridCache cache1 = g1.cache(null); -GridCache cache2 = g2.cache(null); +Cache cache1 = g1.cache(null); +Cache cache2 = g2.cache(null); assertEquals(cache1.affinity().mapKeyToNode(1), g1.cluster().localNode()); assertFalse(cache1.affinity().mapKeyToNode(2).equals(g1.cluster().localNode())); @@ -296,8 +296,8 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { startGrids(); try { -GridCache prj0 = grid(0).cache(null); -GridCache prj1 = grid(1).cache(null); +Cache prj0 = grid(0).cache(null); +Cache prj1 = grid(1).cache(null); Map putMap = new HashMap<>(); @@ -332,9 +332,9 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { startGrids(); try { -GridCache prj0 = grid(0).cache(null); -GridCache prj1 = grid(1).cache(null); -GridCache prj2 = grid(2).cache(null); +Cache prj0 = grid(0).cache(null); +Cache prj1 = grid(1).cache(null); +Cache prj2 = grid(2).cache(null); Map putMap = new HashMap<>(); @@ -390,8 +390,8 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { assertFalse("Nodes cannot be equal: " + primary, primary.equals(backup)); -GridCache cache1 = grid(primary.id()).cache(null); -GridCache cache2 = grid(backup.id()).cache(null); +Cache cache1 = grid(primary.id()).cache(null); +Cache cache2 = grid(backup.id()).cache(null); // Store a values in cache. assertNull(cache1.put(1, "v1")); @@ -431,7 +431,7 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { assertEquals(grid(1).localNode(), F.first(aff.nodes(aff.partition(key2), grid(1).nodes(; -GridCache cache = cache(0); +Cache cache = cache(0); assertNull(cache.put(key1, val1)); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearRemoveFailureTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearRemoveFailureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearRemoveFailureTest.java index e7ce57f..8ffaf71 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearRemoveFailureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearRemoveFailur
[44/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/lang/GridFuncSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridFuncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridFuncSelfTest.java index ebbf30f..fe3f031 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridFuncSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridFuncSelfTest.java @@ -2719,7 +2719,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest { Ignite g = startGrid(1); try { -Cache cache = g.cache(null); +GridCache cache = g.cache(null); cache.put("k1", "v1"); cache.put("k2", "v2"); @@ -2741,7 +2741,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest { Ignite g = startGrid(1); try { -Cache cache = g.cache(null); +GridCache cache = g.cache(null); cache.put("k1", "v1"); @@ -2778,7 +2778,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest { Ignite g = startGrid(1); try { -Cache cache = g.cache(null); +GridCache cache = g.cache(null); cache.put("k1", "v1"); cache.put("k2", "v2"); @@ -2809,7 +2809,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest { Ignite g = startGrid(1); try { -Cache cache = g.cache(null); +GridCache cache = g.cache(null); cache.put("k1", "v1"); cache.put("k2", "v2"); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java index 037f50e..f6b5904 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java @@ -131,7 +131,7 @@ abstract class GridCacheAbstractLoadTest { Ignite ignite = G.ignite(); -final Cache cache = ignite.cache(null); +final GridCache cache = ignite.cache(null); assert cache != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAffinityTransactionsOffHeapTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAffinityTransactionsOffHeapTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAffinityTransactionsOffHeapTest.java index efe0eb3..5b4f6a0 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAffinityTransactionsOffHeapTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAffinityTransactionsOffHeapTest.java @@ -59,7 +59,7 @@ public class GridCacheAffinityTransactionsOffHeapTest { startNodes(); for (int i = 0; i < KEY_CNT; i++) { -Cache c = cache(i); +GridCache c = cache(i); c.putx((long)i, 0); c.putx(new UserKey(i, 0), 0); @@ -71,7 +71,7 @@ public class GridCacheAffinityTransactionsOffHeapTest { long key = 5; -Cache c = cache(key); +GridCache c = cache(key); try (IgniteTx tx = c.txStartAffinity(key, PESSIMISTIC, REPEATABLE_READ, 0, 0)) { Integer val = c.get(key); @@ -153,7 +153,7 @@ public class GridCacheAffinityTransactionsOffHeapTest { * @param key Key. * @return Cache. */ -private static Cache cache(long key) { +private static GridCache cache(long key) { UUID id = Ignition.ignite("grid-0").cache(null).affinity().mapKeyToNode(key).id(); return Ignition.ignite(id).cache(null); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java index 9598902..b781f59 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java @@ -72,7 +72,7 @@ public class GridCacheBench
[16/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateSelfTest.java index 7d60f25..42283ac 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateSelfTest.java @@ -20,14 +20,14 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.cache.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; /** * */ public class GridCacheMultinodeUpdateSelfTest extends GridCacheMultinodeUpdateAbstractSelfTest { /** {@inheritDoc} */ -@Override protected GridCacheDistributionMode distributionMode() { +@Override protected CacheDistributionMode distributionMode() { return PARTITIONED_ONLY; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java index f7fb614..2a28d4b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java @@ -60,7 +60,7 @@ public class GridCacheMvccManagerSelfTest extends GridCommonAbstractTest { CacheConfiguration cfg = defaultCacheConfiguration(); cfg.setCacheMode(mode); - cfg.setWriteSynchronizationMode(GridCacheWriteSynchronizationMode.FULL_SYNC); + cfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); cfg.setAtomicityMode(TRANSACTIONAL); return cfg; @@ -95,7 +95,7 @@ public class GridCacheMvccManagerSelfTest extends GridCommonAbstractTest { try { Ignite ignite = startGridsMultiThreaded(gridCnt); -GridCache cache = ignite.cache(null); +Cache cache = ignite.cache(null); IgniteTx tx = cache.txStart(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java index 473be26..e0bc3e4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java @@ -29,7 +29,7 @@ import java.util.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; /** * Test cases for multi-threaded tests in partitioned cache. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java index ecb3cda..444da3e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*; -import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.t
[29/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java new file mode 100644 index 000..9f1cb91 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java @@ -0,0 +1,203 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.cache.query; + +import java.io.*; +import java.util.*; + +/** + * Query configuration object. + */ +public class CacheQueryConfiguration implements Serializable { +/** */ +private static final long serialVersionUID = 0L; + +/** Collection of query type metadata. */ +private Collection typeMeta; + +/** Query type resolver. */ +private CacheQueryTypeResolver typeRslvr; + +/** */ +private boolean idxPrimitiveKey; + +/** */ +private boolean idxPrimitiveVal; + +/** */ +private boolean idxFixedTyping; + +/** */ +private boolean escapeAll; + +/** + * Default constructor. + */ +public CacheQueryConfiguration() { +// No-op. +} + +/** + * @param cfg Configuration to copy. + */ +public CacheQueryConfiguration(CacheQueryConfiguration cfg) { +typeMeta = cfg.getTypeMetadata(); +typeRslvr = cfg.getTypeResolver(); +idxPrimitiveKey = cfg.isIndexPrimitiveKey(); +idxPrimitiveVal = cfg.isIndexPrimitiveValue(); +idxFixedTyping = cfg.isIndexFixedTyping(); +escapeAll = cfg.isEscapeAll(); +} + +/** + * Gets collection of query type metadata objects. + * + * @return Collection of query type metadata. + */ +public Collection getTypeMetadata() { +return typeMeta; +} + +/** + * Sets collection of query type metadata objects. + * + * @param typeMeta Collection of query type metadata. + */ +public void setTypeMetadata(Collection typeMeta) { +this.typeMeta = typeMeta; +} + +/** + * Gets query type resolver. + * + * @return Query type resolver. + */ +public CacheQueryTypeResolver getTypeResolver() { +return typeRslvr; +} + +/** + * Sets query type resolver. + * + * @param typeRslvr Query type resolver. + */ +public void setTypeResolver(CacheQueryTypeResolver typeRslvr) { +this.typeRslvr = typeRslvr; +} + +/** + * Gets flag indicating whether SQL engine should index by key in cases + * where key is primitive type + * + * @return {@code True} if primitive keys should be indexed. + */ +public boolean isIndexPrimitiveKey() { +return idxPrimitiveKey; +} + +/** + * Sets flag indicating whether SQL engine should index by key in cases + * where key is primitive type. + * + * @param idxPrimitiveKey {@code True} if primitive keys should be indexed. + */ +public void setIndexPrimitiveKey(boolean idxPrimitiveKey) { +this.idxPrimitiveKey = idxPrimitiveKey; +} + +/** + * Gets flag indicating whether SQL engine should index by value in cases + * where value is primitive type + * + * @return {@code True} if primitive values should be indexed. + */ +public boolean isIndexPrimitiveValue() { +return idxPrimitiveVal; +} + +/** + * Sets flag indexing whether SQL engine should index by value in cases + * where value is primitive type. + * + * @param idxPrimitiveVal {@code True} if primitive values should be indexed. + */ +public void setIndexPrimitiveValue(boolean idxPrimitiveVal) { +this.idxPrimitiveVal = idxPrimitiveVal; +} + +/** + * This flag essentially controls whether all values of the same type have + * identical key type. + * + * If {@code false}, SQL engine will store all keys in BINARY form to make it possible to store + * the same value type with different key types.
[32/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicReference.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicReference.java b/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicReference.java new file mode 100644 index 000..ec0d827 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicReference.java @@ -0,0 +1,93 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.cache.datastructures; + +import org.apache.ignite.*; + +/** + * This interface provides a rich API for working with distributed atomic reference. + * + * Functionality + * Distributed atomic reference includes the following main functionality: + * + * + * Method {@link #get()} synchronously gets current value of an atomic reference. + * + * + * Method {@link #set(Object)} synchronously and unconditionally sets the value in the an atomic reference. + * + * + * Methods {@code compareAndSet(...)} synchronously and conditionally set the value in the an atomic reference. + * + * + * All previously described methods have asynchronous analogs. + * + * + * Method {@link #name()} gets name of atomic reference. + * + * + * Creating Distributed Atomic Reference + * Instance of distributed atomic reference can be created by calling the following method: + * + * {@link CacheDataStructures#atomicReference(String, Object, boolean)} + * + * @see CacheDataStructures#atomicReference(String, Object, boolean) + * @see CacheDataStructures#removeAtomicReference(String) + */ +public interface CacheAtomicReference { +/** + * Name of atomic reference. + * + * @return Name of an atomic reference. + */ +public String name(); + +/** + * Gets current value of an atomic reference. + * + * @return current value of an atomic reference. + * @throws IgniteCheckedException If operation failed. + */ +public T get() throws IgniteCheckedException; + +/** + * Unconditionally sets the value. + * + * @param val Value. + * @throws IgniteCheckedException If operation failed. + */ +public void set(T val) throws IgniteCheckedException; + +/** + * Conditionally sets the new value. That will be set if {@code expVal} is equal + * to current value respectively. + * + * @param expVal Expected value. + * @param newVal New value. + * @return Result of operation execution. If {@code true} than value have been updated. + * @throws IgniteCheckedException If operation failed. + */ +public boolean compareAndSet(T expVal, T newVal) throws IgniteCheckedException; + +/** + * Gets status of atomic. + * + * @return {@code true} if an atomic reference was removed from cache, {@code false} otherwise. + */ +public boolean removed(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicSequence.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicSequence.java b/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicSequence.java new file mode 100644 index 000..09ef416 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicSequence.java @@ -0,0 +1,130 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing,
[30/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/GridCacheGgfsPerBlockLruEvictionPolicy.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/GridCacheGgfsPerBlockLruEvictionPolicy.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/GridCacheGgfsPerBlockLruEvictionPolicy.java deleted file mode 100644 index a2ca603..000 --- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/GridCacheGgfsPerBlockLruEvictionPolicy.java +++ /dev/null @@ -1,353 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache.eviction.ggfs; - -import org.apache.ignite.*; -import org.apache.ignite.cache.*; -import org.apache.ignite.cache.eviction.*; -import org.apache.ignite.fs.*; -import org.apache.ignite.internal.processors.fs.*; -import org.jdk8.backport.*; -import org.jdk8.backport.ConcurrentLinkedDeque8.*; -import org.jetbrains.annotations.*; - -import java.util.*; -import java.util.concurrent.atomic.*; -import java.util.regex.*; - -/** - * GGFS eviction policy which evicts particular blocks. - */ -public class GridCacheGgfsPerBlockLruEvictionPolicy implements GridCacheEvictionPolicy, -GridCacheGgfsPerBlockLruEvictionPolicyMBean { -/** Meta denoting node in the queue. */ -public static final String META_NODE = "ggfs_node"; - -/** Maximum size. When reached, eviction begins. */ -private volatile long maxSize; - -/** Maximum amount of blocks. When reached, eviction begins. */ -private volatile int maxBlocks; - -/** Collection of regex for paths which must not be evicted. */ -private volatile Collection excludePaths; - -/** Exclusion patterns. */ -private volatile Collection excludePatterns; - -/** Whether patterns must be recompiled during the next call. */ -private final AtomicBoolean excludeRecompile = new AtomicBoolean(true); - -/** Queue. */ -private final ConcurrentLinkedDeque8> queue = -new ConcurrentLinkedDeque8<>(); - -/** Current size of all enqueued blocks in bytes. */ -private final LongAdder curSize = new LongAdder(); - -/** - * Default constructor. - */ -public GridCacheGgfsPerBlockLruEvictionPolicy() { -// No-op. -} - -/** - * Constructor. - * - * @param maxSize Maximum size. When reached, eviction begins. - * @param maxBlocks Maximum amount of blocks. When reached, eviction begins. - */ -public GridCacheGgfsPerBlockLruEvictionPolicy(long maxSize, int maxBlocks) { -this(maxSize, maxBlocks, null); -} - -/** - * Constructor. - * - * @param maxSize Maximum size. When reached, eviction begins. - * @param maxBlocks Maximum amount of blocks. When reached, eviction begins. - * @param excludePaths Collection of regex for path which must not be evicted. - */ -public GridCacheGgfsPerBlockLruEvictionPolicy(long maxSize, int maxBlocks, -@Nullable Collection excludePaths) { -this.maxSize = maxSize; -this.maxBlocks = maxBlocks; -this.excludePaths = excludePaths; -} - -/** {@inheritDoc} */ -@Override public void onEntryAccessed(boolean rmv, GridCacheEntry entry) { -if (!rmv) { -if (!entry.isCached()) -return; - -if (touch(entry)) -shrink(); -} -else { -MetaEntry meta = entry.removeMeta(META_NODE); - -if (meta != null && queue.unlinkx(meta.node())) -changeSize(-meta.size()); -} -} - -/** - * @param entry Entry to touch. - * @return {@code True} if new node has been added to queue by this call. - */ -private boolean touch(GridCacheEntry entry) { -byte[] val = entry.peek(); - -int blockSize = val != null ? val.length : 0; - -MetaEntry meta = entry.meta(META_NODE); - -// Entry has not been enqueued yet. -if (meta == null) { -while (true) { -Node> node = queue.offerLastx(entry); - -
[26/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java index a71aaec..021167f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java @@ -137,7 +137,7 @@ public interface GridCacheEntryEx { * @param prjAware {@code true} if entry should inherit projection properties. * @return Wrapped entry. */ -public GridCacheEntry wrap(boolean prjAware); +public CacheEntry wrap(boolean prjAware); /** * Wraps this map entry into cache entry for filter evaluation inside entry lock. @@ -145,12 +145,12 @@ public interface GridCacheEntryEx { * @return Wrapped entry. * @throws IgniteCheckedException If failed. */ -public GridCacheEntry wrapFilterLocked() throws IgniteCheckedException; +public CacheEntry wrapFilterLocked() throws IgniteCheckedException; /** * @return Entry which is safe to pass into eviction policy. */ -public GridCacheEntry evictWrap(); +public CacheEntry evictWrap(); /** * @return Not-null version if entry is obsolete. @@ -198,7 +198,7 @@ public interface GridCacheEntryEx { * @throws IgniteCheckedException If swap could not be released. * @throws GridCacheEntryRemovedException If entry was removed. */ -public boolean invalidate(@Nullable IgnitePredicate>[] filter) +public boolean invalidate(@Nullable IgnitePredicate>[] filter) throws GridCacheEntryRemovedException, IgniteCheckedException; /** @@ -209,7 +209,7 @@ public interface GridCacheEntryEx { * @throws IgniteCheckedException If operation failed. * @return {@code true} if entry was not being used and could be removed. */ -public boolean compact(@Nullable IgnitePredicate>[] filter) +public boolean compact(@Nullable IgnitePredicate>[] filter) throws GridCacheEntryRemovedException, IgniteCheckedException; /** @@ -220,7 +220,7 @@ public interface GridCacheEntryEx { * @throws IgniteCheckedException In case of error. */ public boolean evictInternal(boolean swap, GridCacheVersion obsoleteVer, -@Nullable IgnitePredicate>[] filter) throws IgniteCheckedException; +@Nullable IgnitePredicate>[] filter) throws IgniteCheckedException; /** * Evicts entry when batch evict is performed. When called, does not write entry data to swap, but instead @@ -301,7 +301,7 @@ public interface GridCacheEntryEx { UUID subjId, Object transformClo, String taskName, -IgnitePredicate>[] filter, +IgnitePredicate>[] filter, @Nullable IgniteCacheExpiryPolicy expiryPlc) throws IgniteCheckedException, GridCacheEntryRemovedException, GridCacheFilterFailedException; @@ -313,7 +313,7 @@ public interface GridCacheEntryEx { * @throws IgniteCheckedException If reload failed. * @throws GridCacheEntryRemovedException If entry has been removed. */ -@Nullable public V innerReload(IgnitePredicate>... filter) throws IgniteCheckedException, +@Nullable public V innerReload(IgnitePredicate>... filter) throws IgniteCheckedException, GridCacheEntryRemovedException; /** @@ -351,7 +351,7 @@ public interface GridCacheEntryEx { boolean evt, boolean metrics, long topVer, -IgnitePredicate>[] filter, +IgnitePredicate>[] filter, GridDrType drType, long drExpireTime, @Nullable GridCacheVersion explicitVer, @@ -387,7 +387,7 @@ public interface GridCacheEntryEx { boolean evt, boolean metrics, long topVer, -IgnitePredicate>[] filter, +IgnitePredicate>[] filter, GridDrType drType, @Nullable GridCacheVersion explicitVer, @Nullable UUID subjId, @@ -442,7 +442,7 @@ public interface GridCacheEntryEx { boolean metrics, boolean primary, boolean checkVer, -@Nullable IgnitePredicate>[] filter, +@Nullable IgnitePredicate>[] filter, GridDrType drType, long drTtl, long drExpireTime, @@ -483,7 +483,7 @@ public interface GridCacheEntryEx { @Nullable ExpiryPolicy expiryPlc, boolean evt, boolean metrics, -@Nullable IgnitePredicate>[] filter, +@Nullable IgnitePredicate>[] filter, boolean intercept, @Nullable UUID subjId, String taskName @@ -501,7 +501,7 @@ public interface GridCacheEntryEx {
[04/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestMain.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestMain.java b/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestMain.java index 4d8539c..0a8c6e9 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestMain.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestMain.java @@ -43,7 +43,7 @@ public class GridTestMain { // Initialize Spring factory. try (Ignite g = G.start((IgniteConfiguration)ctx.getBean("grid.cfg"))) { -final GridCache cache = g.cache("partitioned"); +final Cache cache = g.cache("partitioned"); assert cache != null; @@ -71,7 +71,7 @@ public class GridTestMain { Ignite g = G.ignite(); -final GridCache cache = g.cache("partitioned"); +final Cache cache = g.cache("partitioned"); final BlockingQueue q = new ArrayBlockingQueue<>(400); @@ -133,7 +133,7 @@ public class GridTestMain { long start = System.currentTimeMillis(); -final GridCache cache = G.ignite().cache("partitioned"); +final Cache cache = G.ignite().cache("partitioned"); // Collocate computations and data. for (long i = 0; i < GridTestConstants.ENTRY_COUNT; i++) { @@ -164,7 +164,7 @@ public class GridTestMain { * @param cache Cache to load. * @throws IgniteCheckedException If failed. */ -private static void loadFromStore(GridCache cache) throws IgniteCheckedException { +private static void loadFromStore(Cache cache) throws IgniteCheckedException { cache.loadCache(null, 0, GridTestConstants.LOAD_THREADS, GridTestConstants.ENTRY_COUNT); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/spring-colocation.xml -- diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/spring-colocation.xml b/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/spring-colocation.xml index d4b39c5..71355a5 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/spring-colocation.xml +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/spring-colocation.xml @@ -127,7 +127,7 @@ sets the number of backups to 1 (which is default). --> - + http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/loadtests/continuous/GridContinuousOperationsLoadTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/continuous/GridContinuousOperationsLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/continuous/GridContinuousOperationsLoadTest.java index d539dd6..9e39b77 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/continuous/GridContinuousOperationsLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/continuous/GridContinuousOperationsLoadTest.java @@ -39,7 +39,7 @@ import static org.apache.ignite.testframework.GridLoadTestUtils.*; import static org.apache.ignite.testframework.GridTestUtils.*; /** - * Load test for {@link org.apache.ignite.cache.query.GridCacheContinuousQuery}. + * Load test for {@link org.apache.ignite.cache.query.CacheContinuousQuery}. */ public class GridContinuousOperationsLoadTest { /** @@ -78,7 +78,7 @@ public class GridContinuousOperationsLoadTest { dumpProperties(System.out); try (Ignite ignite = Ignition.start(cfgPath)) { -final GridCache cache = ignite.cache(cacheName); +final Cache cache = ignite.cache(cacheName); if (cache == null) throw new IgniteCheckedException("Cache is not configured: " + cacheName); @@ -96,7 +96,7 @@ public class GridContinuousOperationsLoadTest { for (int i = 0; i < parallelCnt; i++) { if (useQry) { -GridCacheContinuousQuery qry = cache.queries().createContinuousQuery(); +CacheContinuousQuery qry = cache.queries().createContinuousQuery(); qry.callback(new PX2>>() { @Override public boolean applyx(UUID uuid, Collection> entries) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/
[40/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/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 705a569..893d52a 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java @@ -34,8 +34,8 @@ import java.util.concurrent.*; * Main entry point for all Data Grid APIs. You can get a named cache by calling {@link Ignite#cache(String)} * method. * Functionality - * This API extends {@link org.apache.ignite.cache.GridCacheProjection} API which contains vast majority of cache functionality - * and documentation. In addition to {@link org.apache.ignite.cache.GridCacheProjection} functionality this API provides: + * This API extends {@link org.apache.ignite.cache.CacheProjection} API which contains vast majority of cache functionality + * and documentation. In addition to {@link org.apache.ignite.cache.CacheProjection} functionality this API provides: * * * Various {@code 'loadCache(..)'} methods to load cache either synchronously or asynchronously. @@ -43,13 +43,13 @@ import java.util.concurrent.*; * data based on the optionally passed in arguments. * * - * Method {@link #affinity()} provides {@link org.apache.ignite.cache.affinity.GridCacheAffinityFunction} service for information on + * Method {@link #affinity()} provides {@link org.apache.ignite.cache.affinity.CacheAffinityFunction} service for information on * data partitioning and mapping keys to grid nodes responsible for caching those keys. * * - * Method {@link #dataStructures()} provides {@link org.apache.ignite.cache.datastructures.GridCacheDataStructures} service for + * Method {@link #dataStructures()} provides {@link org.apache.ignite.cache.datastructures.CacheDataStructures} service for * creating and working with distributed concurrent data structures, such as - * {@link IgniteAtomicLong}, {@link IgniteAtomicReference}, {@link org.apache.ignite.cache.datastructures.GridCacheQueue}, etc. + * {@link IgniteAtomicLong}, {@link IgniteAtomicReference}, {@link org.apache.ignite.cache.datastructures.CacheQueue}, etc. * * * Methods like {@code 'tx{Un}Synchronize(..)'} witch allow to get notifications for transaction state changes. @@ -77,7 +77,7 @@ public interface IgniteCache extends javax.cache.Cache, IgniteAsyncS * which is true for near fully populated caches, this method will generally perform significantly * faster with complexity of O(S) where {@code S = 5}. * - * Note that this method is not available on {@link org.apache.ignite.cache.GridCacheProjection} API since it is + * Note that this method is not available on {@link org.apache.ignite.cache.CacheProjection} API since it is * impossible (or very hard) to deterministically return a number value when pre-filtering * and post-filtering is involved (e.g. projection level predicate filters). * @@ -146,14 +146,14 @@ public interface IgniteCache extends javax.cache.Cache, IgniteAsyncS * if there is one. * Cache Flags * This method is not available if any of the following flags are set on projection: - * {@link org.apache.ignite.cache.GridCacheFlag#LOCAL}, {@link org.apache.ignite.cache.GridCacheFlag#READ}. + * {@link org.apache.ignite.cache.CacheFlag#LOCAL}, {@link org.apache.ignite.cache.CacheFlag#READ}. * * @param key Key to store in cache. * @param val Value to be associated with the given key. * @return Previously contained value regardless of whether put happened or not. * @throws NullPointerException If either key or value are {@code null}. * @throws CacheException If put operation failed. - * @throws org.apache.ignite.cache.GridCacheFlagException If projection flags validation failed. + * @throws org.apache.ignite.cache.CacheFlagException If projection flags validation failed. */ @Nullable public V getAndPutIfAbsent(K key, V val) throws CacheException; @@ -223,11 +223,11 @@ public interface IgniteCache extends javax.cache.Cache, IgniteAsyncS * participating in any locks or transactions). * * If {@link CacheConfiguration#isSwapEnabled()} is set to {@code true} and - * {@link org.apache.ignite.cache.GridCacheFlag#SKIP_SWAP} is not enabled, the evicted entry will + * {@link org.apache.ignite.cache.CacheFlag#SKIP_SWAP} is not enabled, the evicted entry will * be swapped to offheap, and then to disk. * Cache Flags * This method is not available if any of the following flags are set on projection: - * {@link org.apache.ignite.cache.GridCacheFlag#READ}. + * {@link org.apache.ignite.cache.Ca
[28/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/query/GridCacheQuerySqlField.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/GridCacheQuerySqlField.java b/modules/core/src/main/java/org/apache/ignite/cache/query/GridCacheQuerySqlField.java deleted file mode 100644 index 8d95753..000 --- a/modules/core/src/main/java/org/apache/ignite/cache/query/GridCacheQuerySqlField.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache.query; - -import java.lang.annotation.*; - -/** - * Annotates fields for SQL queries. All fields that will be involved in SQL clauses must have - * this annotation. For more information about cache queries see {@link GridCacheQuery} documentation. - * @see GridCacheQuery - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD}) -public @interface GridCacheQuerySqlField { -/** - * Specifies whether cache should maintain an index for this field or not. - * Just like with databases, field indexing may require additional overhead - * during updates, but makes select operations faster. - * - * When indexing SPI and indexed field is - * of type {@code com.vividsolutions.jts.geom.Geometry} (or any subclass of this class) then GridGain will - * consider this index as spatial providing performance boost for spatial queries. - * - * @return {@code True} if index must be created for this field in database. - */ -boolean index() default false; - -/** - * Specifies whether index should be unique or not. This property only - * makes sense if {@link #index()} property is set to {@code true}. - * - * @return {@code True} if field index should be unique. - * @deprecated No longer supported, will be ignored. - */ -@Deprecated -boolean unique() default false; - -/** - * Specifies whether index should be in descending order or not. This property only - * makes sense if {@link #index()} property is set to {@code true}. - * - * @return {@code True} if field index should be in descending order. - */ -boolean descending() default false; - -/** - * Array of index groups this field belongs to. Groups are used for compound indexes, - * whenever index should be created on more than one field. All fields within the same - * group will belong to the same index. - * - * Group indexes are needed because SQL engine can utilize only one index per table occurrence in a query. - * For example if we have two separate indexes on fields {@code a} and {@code b} of type {@code X} then - * query {@code select * from X where a = ? and b = ?} will use for filtering either index on field {@code a} - * or {@code b} but not both. For more effective query execution here it is preferable to have a single - * group index on both fields. - * - * For more complex scenarios please refer to {@link GridCacheQuerySqlField.Group} documentation. - * - * @return Array of group names. - */ -String[] groups() default {}; - -/** - * Array of ordered index groups this field belongs to. For more information please refer to - * {@linkplain GridCacheQuerySqlField.Group} documentation. - * - * @return Array of ordered group indexes. - * @see #groups() - */ -Group[] orderedGroups() default {}; - -/** - * Property name. If not provided then field name will be used. - * - * @return Name of property. - */ -String name() default ""; - -/** - * Describes group of index and position of field in this group. - * - * Opposite to {@link #groups()} this annotation gives control over order of fields in a group index. - * This can be needed in scenarios when we have a query like - * {@code select * from X where a = ? and b = ? order by b desc}. If we have index {@code (a asc, b asc)} - * sorting on {@code b} will be performed. Here it is preferable to h
[39/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/CacheFlag.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheFlag.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheFlag.java new file mode 100644 index 000..ed74b7d --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheFlag.java @@ -0,0 +1,110 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.cache; + +import org.apache.ignite.*; +import org.apache.ignite.transactions.*; +import org.jetbrains.annotations.*; + +import javax.cache.processor.*; + +/** + * Cache projection flags that specify projection behaviour. This flags can be explicitly passed into + * the following methods on {@link CacheProjection}: + * + * {@link CacheProjection#flagsOn(CacheFlag...)} + * {@link CacheProjection#flagsOff(CacheFlag...)} + * + * Also, some flags, like {@link #LOCAL}, or {@link #READ} may be implicitly set whenever + * creating new projections and passing entries to predicate filters. + */ +public enum CacheFlag { +/** + * Only operations that don't require any communication with + * other cache nodes are allowed. This flag is automatically set + * on underlying projection for all the entries that are given to + * predicate filters to make sure that no distribution happens + * from inside of predicate evaluation. + */ +LOCAL, + +/** + * Only operations that don't change cached data are allowed. + * This flag is automatically set on underlying projection for + * all the entries that are given to predicate filters to make + * sure that data cannot be updated during predicate evaluation. + */ +READ, + +/** + * Clone values prior to returning them to user. + * + * Whenever values are returned from cache, they cannot be directly updated + * as cache holds the same references internally. If it is needed to + * update values that are returned from cache, this flag will provide + * automatic cloning of values prior to returning so they can be directly + * updated. + * + * @see CacheConfiguration#getCloner() + */ +CLONE, + +/** Skips store, i.e. no read-through and no write-through behavior. */ +SKIP_STORE, + +/** Skip swap space for reads and writes. */ +SKIP_SWAP, + +/** Synchronous commit. */ +SYNC_COMMIT, + +/** + * Switches a cache projection to work in {@code 'invalidation'} mode. + * Instead of updating remote entries with new values, small invalidation + * messages will be sent to set the values to {@code null}. + * + * @see IgniteTx#isInvalidate() + * @see CacheConfiguration#isInvalidate() + */ +INVALIDATE, + +/** + * Skips version check during {@link IgniteCache#invoke(Object, EntryProcessor, Object[])} writes in + * {@link CacheAtomicityMode#ATOMIC} mode. By default, in {@code ATOMIC} mode, whenever + * {@code transform(...)} is called, cache values (and not the {@code transform} closure) are sent from primary + * node to backup nodes to ensure proper update ordering. + * + * By setting this flag, version check is skipped, and the {@code transform} closure is applied on both, primary + * and backup nodes. Use this flag for better performance if you are sure that there are no + * concurrent updates happening for the same key when {@code transform(...)} method is called. + */ +FORCE_TRANSFORM_BACKUP; + +/** */ +private static final CacheFlag[] VALS = values(); + +/** + * Efficiently gets enumerated value from its ordinal. + * + * @param ord Ordinal value. + * @return Enumerated value or {@code null} if ordinal out of range. + */ +@Nullable public static CacheFlag fromOrdinal(int ord) { +return ord >= 0 && ord < VALS.length ? VALS[ord] : null; +} +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/CacheFlagException.java
[14/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicLongApiSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicLongApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicLongApiSelfTest.java index 37bc281..3cf6f32 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicLongApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicLongApiSelfTest.java @@ -30,10 +30,10 @@ import org.apache.ignite.testframework.junits.common.*; import java.util.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Cache atomic long api test. @@ -125,7 +125,7 @@ public class GridCacheAtomicLongApiSelfTest extends GridCommonAbstractTest { private void createRemove(String cacheName) throws Exception { info("Running test [name=" + getName() + ", cache=" + cacheName + ']'); -GridCache cache = grid().cache(cacheName); +Cache cache = grid().cache(cacheName); assertNotNull(cache); assertEquals(0, cache.primarySize()); @@ -134,9 +134,9 @@ public class GridCacheAtomicLongApiSelfTest extends GridCommonAbstractTest { String atomicName2 = "SECOND"; -GridCacheAtomicLong atomic1 = cache.dataStructures().atomicLong(atomicName1, 0, true); -GridCacheAtomicLong atomic2 = cache.dataStructures().atomicLong(atomicName2, 0, true); -GridCacheAtomicLong atomic3 = cache.dataStructures().atomicLong(atomicName1, 0, true); +CacheAtomicLong atomic1 = cache.dataStructures().atomicLong(atomicName1, 0, true); +CacheAtomicLong atomic2 = cache.dataStructures().atomicLong(atomicName2, 0, true); +CacheAtomicLong atomic3 = cache.dataStructures().atomicLong(atomicName1, 0, true); assertNotNull(atomic1); assertNotNull(atomic2); @@ -183,12 +183,12 @@ public class GridCacheAtomicLongApiSelfTest extends GridCommonAbstractTest { private void incrementAndGet(String cacheName) throws Exception { info("Running test [name=" + getName() + ", cache=" + cacheName + ']'); -GridCache cache = grid().cache(cacheName); +Cache cache = grid().cache(cacheName); assertNotNull(cache); assertEquals(0, cache.primarySize()); -GridCacheAtomicLong atomic = cache.dataStructures().atomicLong("atomic", 0, true); +CacheAtomicLong atomic = cache.dataStructures().atomicLong("atomic", 0, true); assertEquals(0, cache.primarySize()); @@ -216,12 +216,12 @@ public class GridCacheAtomicLongApiSelfTest extends GridCommonAbstractTest { private void getAndIncrement(String cacheName) throws Exception { info("Running test [name=" + getName() + ", cache=" + cacheName + ']'); -GridCache cache = grid().cache(cacheName); +Cache cache = grid().cache(cacheName); assertNotNull(cache); assertEquals(0, cache.primarySize()); -GridCacheAtomicLong atomic = cache.dataStructures().atomicLong("atomic", 0, true); +CacheAtomicLong atomic = cache.dataStructures().atomicLong("atomic", 0, true); assertEquals(0, cache.primarySize()); @@ -249,12 +249,12 @@ public class GridCacheAtomicLongApiSelfTest extends GridCommonAbstractTest { private void decrementAndGet(String cacheName) throws Exception { info("Running test [name=" + getName() + ", cache=" + cacheName + ']'); -GridCache cache = grid().cache(cacheName); +Cache cache = grid().cache(cacheName); assertNotNull(cache); assertEquals(0, cache.primarySize()); -GridCacheAtomicLong atomic = cache.dataStructures().atomicLong("atomic", 0, true); +CacheAtomicLong atomic = cache.dataStructures().atomicLong("atomic", 0, true); assertEquals(0, cache.primarySize()); @@ -282,12 +282,12 @@ public class GridCacheAtomicLongApiSelfTest extends GridCommonAbstractTest { private void getAndDecrement(String cacheName) throws Exception { info("Running test [name=" + getName() + ", cache=" + cacheName + ']'); -GridCache cache = grid().cache(cacheName); +Ca
[53/55] [abbrv] incubator-ignite git commit: # ignite-63
# ignite-63 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/91d2b898 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/91d2b898 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/91d2b898 Branch: refs/heads/ignite-65 Commit: 91d2b89863db37c40489bedc5b046bc5b7e93928 Parents: 50d64b0 Author: sboikov Authored: Fri Jan 23 16:16:06 2015 +0300 Committer: sboikov Committed: Fri Jan 23 16:16:06 2015 +0300 -- .../ignite/gridify/hierarchy/SuperTarget.java | 53 1 file changed, 53 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/91d2b898/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/SuperTarget.java -- diff --git a/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/SuperTarget.java b/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/SuperTarget.java new file mode 100644 index 000..c2ba1b0 --- /dev/null +++ b/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/SuperTarget.java @@ -0,0 +1,53 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.gridify.hierarchy; + +import org.apache.ignite.compute.gridify.*; + +/** + * Target base class. + */ +public abstract class SuperTarget { +/** + * @return Always returns "SuperTarget.methodA()". + */ +@Gridify(gridName = "GridifyHierarchyTest") +protected String methodA() { +System.out.println(">>> Called SuperTarget.methodA()"); + +return "SuperTarget.methodA()"; +} + +/** + * @return "SuperTarget.methodC()" string. + */ +protected String methodB() { +return methodC(); +} + +/** + * @return "SuperTarget.methodC()" string. + */ +@Gridify(gridName = "GridifyHierarchyTest") +private String methodC() { +System.out.println(">>> Called SuperTarget.methodC()"); + +return "SuperTarget.methodC()"; +} + +}
[52/55] [abbrv] incubator-ignite git commit: # ignite-63
# ignite-63 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/50d64b0a Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/50d64b0a Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/50d64b0a Branch: refs/heads/ignite-65 Commit: 50d64b0ab61e76a6f6a61b5dbb4069f2af24c592 Parents: 168d7d0 Author: sboikov Authored: Fri Jan 23 17:13:30 2015 +0400 Committer: sboikov Committed: Fri Jan 23 17:13:30 2015 +0400 -- .../scalar/examples/ScalarCacheAffinitySimpleExample.scala | 6 +++--- .../ignite/scalar/examples/ScalarCacheQueryExample.scala | 4 ++-- .../ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/50d64b0a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala -- diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala index dd62b9e..e3959a0 100644 --- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala +++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala @@ -43,7 +43,7 @@ object ScalarCacheAffinitySimpleExample extends App { private val NAME = "partitioned" /** Type alias. */ -type GridCache = GridCache[Int, String] +type Cache = GridCache[Int, String] /* * Note that in case of `LOCAL` configuration, @@ -65,7 +65,7 @@ object ScalarCacheAffinitySimpleExample extends App { * * @param c Cache to use. */ -private def visit(c: GridCache) { +private def visit(c: Cache) { (0 until KEY_CNT).foreach(i => grid$.compute().affinityRun(NAME, i, () => println("Co-located [key= " + i + ", value=" + c.peek(i) + ']')) @@ -77,7 +77,7 @@ object ScalarCacheAffinitySimpleExample extends App { * * @param c Cache to populate. */ -private def populate(c: GridCache) { +private def populate(c: Cache) { (0 until KEY_CNT).foreach(i => c += (i -> i.toString)) } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/50d64b0a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala -- diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala index 4ac6303..cda85d9 100644 --- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala +++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala @@ -15,13 +15,13 @@ * limitations under the License. */ -package org.gridgain.scalar.examples +package org.apache.ignite.scalar.examples import org.apache.ignite.cache.{CacheMode, CacheFlag, CacheProjection} import org.apache.ignite.cache.affinity.CacheAffinityKey import org.gridgain.scalar._ import scalar._ -import org.apache.ignite._ +import org.apache.ignite.Ignite import CacheMode._ import java.util._ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/50d64b0a/examples/src/test/scala/org/apache/ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala -- diff --git a/examples/src/test/scala/org/apache/ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala b/examples/src/test/scala/org/apache/ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala index e29a063..f026747 100644 --- a/examples/src/test/scala/org/apache/ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala +++ b/examples/src/test/scala/org/apache/ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala @@ -17,6 +17,7 @@ package org.apache.ignite.scalar.tests.examples +import org.apache.ignite.scalar.examples.{ScalarCacheQueryExample, ScalarCacheAffinitySimpleExample} import org.gridgain.scalar.examples._ import org.gridgain.scalar.scalar import org.scalatest.junit.JUnitSuiteLike
[48/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java index 11d1d00..be7babc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java @@ -32,6 +32,7 @@ import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.testframework.junits.common.*; import org.jetbrains.annotations.*; +import javax.cache.*; import javax.cache.configuration.*; import javax.cache.integration.*; import java.util.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java index 3cc4602..91b20fe 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java @@ -102,8 +102,8 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest { public void testLuceneIndex() throws Exception { final Ignite g = startGrid(0); -final Cache cache1 = g.cache("local1"); -final Cache cache2 = g.cache("local2"); +final GridCache cache1 = g.cache("local1"); +final GridCache cache2 = g.cache("local2"); final AtomicInteger threadIdxGen = new AtomicInteger(); @@ -159,8 +159,8 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest { public void testLuceneIndex1() throws Exception { final Ignite g = startGrid(0); -final Cache cache1 = g.cache("local1"); -final Cache cache2 = g.cache("local2"); +final GridCache cache1 = g.cache("local1"); +final GridCache cache2 = g.cache("local2"); final AtomicInteger threadIdxGen = new AtomicInteger(); @@ -230,8 +230,8 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest { public void testLuceneIndex2() throws Exception { final Ignite g = startGrid(0); -final Cache cache1 = g.cache("local1"); -final Cache cache2 = g.cache("local2"); +final GridCache cache1 = g.cache("local1"); +final GridCache cache2 = g.cache("local2"); final AtomicInteger threadIdxGen = new AtomicInteger(); @@ -303,8 +303,8 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest { public void testLuceneIndex3() throws Exception { final Ignite g = startGrid(0); -final Cache cache1 = g.cache("local1"); -final Cache cache2 = g.cache("local2"); +final GridCache cache1 = g.cache("local1"); +final GridCache cache2 = g.cache("local2"); final AtomicInteger threadIdxGen = new AtomicInteger(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java index bbf605f..81b0ce2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java @@ -209,16 +209,16 @@ public class GridCacheMemoryModeSelfTest extends GridCommonAbstractTest { final int all = cache + offheapSwap; // put -doTest(cache, offheapSwap, offheapEmpty, swapEmpty, new CIX1>() { -@Override public void applyx(Cache c) throws IgniteCheckedException { +doTest(cache, offheapSwap, offheapEmpty, swapEmpty, new CIX1>() { +@Override public void applyx(GridCache c) throws IgniteCheckedException { for (int i = 0; i < all; i++) c.put(valueOf(i), i); } }); //putAll -doTest(cache, offheapSw
[11/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java index 7059e47..fee7183 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java @@ -37,8 +37,8 @@ import java.util.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; import static org.apache.ignite.events.IgniteEventType.*; /** @@ -69,7 +69,7 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT CacheConfiguration cacheCfg = defaultCacheConfiguration(); cacheCfg.setCacheMode(PARTITIONED); - cacheCfg.setWriteSynchronizationMode(GridCacheWriteSynchronizationMode.FULL_SYNC); + cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); cacheCfg.setSwapEnabled(false); cacheCfg.setEvictSynchronized(true); cacheCfg.setEvictNearSynchronized(true); @@ -81,8 +81,8 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT // Set eviction queue size explicitly. cacheCfg.setEvictSynchronizedKeyBufferSize(1); cacheCfg.setEvictMaxOverflowRatio(0); -cacheCfg.setEvictionPolicy(new GridCacheFifoEvictionPolicy(10)); -cacheCfg.setNearEvictionPolicy(new GridCacheFifoEvictionPolicy(10)); +cacheCfg.setEvictionPolicy(new CacheFifoEvictionPolicy(10)); +cacheCfg.setNearEvictionPolicy(new CacheFifoEvictionPolicy(10)); cfg.setCacheConfiguration(cacheCfg); @@ -167,8 +167,8 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT * @param idx Index. * @return Affinity. */ -private GridCacheConsistentHashAffinityFunction affinity(int idx) { -return (GridCacheConsistentHashAffinityFunction)grid(idx).cache(null).configuration().getAffinity(); +private CacheConsistentHashAffinityFunction affinity(int idx) { +return (CacheConsistentHashAffinityFunction)grid(idx).cache(null).configuration().getAffinity(); } /** @@ -176,7 +176,7 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT * @return Primary node for the given key. */ private Collection keyNodes(Object key) { -GridCacheConsistentHashAffinityFunction aff = affinity(0); +CacheConsistentHashAffinityFunction aff = affinity(0); return aff.nodes(aff.partition(key), grid(0).nodes(), 1); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java index ce5825a..fab65a9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java @@ -38,8 +38,8 @@ import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; import static org.apache.ignite.events.IgniteEventType.*; /** @@ -71,7 +71,7 @@ public class GridCacheDhtEvictionSelfTest extends GridCommonAbstractTest { cacheCfg.setCacheMode(PARTITIONED); cacheCfg.setPreloadMode(NONE); - cacheCfg.setWriteSynchronizationMode(GridCacheWriteSynchronizationMode.FULL_SYNC); +
[01/55] [abbrv] incubator-ignite git commit: # ignite-63
Repository: incubator-ignite Updated Branches: refs/heads/ignite-65 f90b64162 -> 09dd0ef32 http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java index a43c5f4..b53abd4 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java @@ -57,7 +57,7 @@ public class GridH2IndexingGeoSelfTest extends GridCacheAbstractSelfTest { */ @SuppressWarnings("unchecked") public void testGeo() throws Exception { -GridCache cache = grid(0).cache(null); +Cache cache = grid(0).cache(null); WKTReader r = new WKTReader(); @@ -66,7 +66,7 @@ public class GridH2IndexingGeoSelfTest extends GridCacheAbstractSelfTest { cache.put(2, new EnemyCamp(r.read("POINT(70 30)"), "C")); cache.put(3, new EnemyCamp(r.read("POINT(75 25)"), "D")); -GridCacheQuery> qry = cache.queries().createSqlQuery(EnemyCamp.class, +CacheQuery> qry = cache.queries().createSqlQuery(EnemyCamp.class, "coords && ?"); Collection> res = qry.execute(r.read("POLYGON((5 70, 5 80, 30 80, 30 70, 5 70))")) @@ -113,9 +113,9 @@ public class GridH2IndexingGeoSelfTest extends GridCacheAbstractSelfTest { */ @SuppressWarnings("unchecked") public void testGeoMultithreaded() throws Exception { -final GridCache cache1 = grid(0).cache(null); -final GridCache cache2 = grid(1).cache(null); -final GridCache cache3 = grid(2).cache(null); +final Cache cache1 = grid(0).cache(null); +final Cache cache2 = grid(1).cache(null); +final Cache cache3 = grid(2).cache(null); final String[] points = new String[CNT]; @@ -146,7 +146,7 @@ public class GridH2IndexingGeoSelfTest extends GridCacheAbstractSelfTest { while (!stop.get()) { int cacheIdx = rnd.nextInt(0, 3); -GridCache cache = cacheIdx == 0 ? cache1 : cacheIdx == 1 ? cache2 : cache3; +Cache cache = cacheIdx == 0 ? cache1 : cacheIdx == 1 ? cache2 : cache3; int idx = rnd.nextInt(CNT); int x = rnd.nextInt(1, 100); @@ -171,9 +171,9 @@ public class GridH2IndexingGeoSelfTest extends GridCacheAbstractSelfTest { try { int cacheIdx = rnd.nextInt(0, 3); -GridCache cache = cacheIdx == 0 ? cache1 : cacheIdx == 1 ? cache2 : cache3; +Cache cache = cacheIdx == 0 ? cache1 : cacheIdx == 1 ? cache2 : cache3; -GridCacheQuery> qry = cache.queries().createSqlQuery( +CacheQuery> qry = cache.queries().createSqlQuery( EnemyCamp.class, "coords && ?"); Collection> res = qry.execute( @@ -229,11 +229,11 @@ public class GridH2IndexingGeoSelfTest extends GridCacheAbstractSelfTest { */ private static class EnemyCamp implements Serializable { /** */ -@GridCacheQuerySqlField(index = true) +@CacheQuerySqlField(index = true) private Geometry coords; /** */ -@GridCacheQuerySqlField +@CacheQuerySqlField private String name; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/GridTestEntity.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/GridTestEntity.java b/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/GridTestEntity.java index 75a5a8f..39069f1 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/GridTestEntity.java +++ b/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/GridTestEntity.java @@ -26,11 +26,11 @@ import java.util.*; */ public class GridTestEntity { /** */ -@GridCacheQuerySqlField(index = true) +@CacheQuerySqlField(index = true) private final String name; /** */ -@GridCacheQuerySqlField(index = false) +@CacheQuerySqlField(index = false) private final Date date; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.j
[10/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java index b097f25..5ab4365 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java @@ -35,8 +35,8 @@ public class GridCachePartitionedTxOriginatingNodeFailureSelfTest extends private static final int BACKUP_CNT = 2; /** {@inheritDoc} */ -@Override protected GridCacheDistributionMode distributionMode() { -return GridCacheDistributionMode.NEAR_PARTITIONED; +@Override protected CacheDistributionMode distributionMode() { +return CacheDistributionMode.NEAR_PARTITIONED; } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java index ea586ca..28e5c4b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java @@ -33,7 +33,7 @@ import org.apache.ignite.testframework.junits.common.*; import java.util.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; import static org.apache.ignite.events.IgniteEventType.*; /** @@ -62,7 +62,7 @@ public class GridCachePartitionedUnloadEventsSelfTest extends GridCommonAbstract CacheConfiguration cacheCfg = defaultCacheConfiguration(); cacheCfg.setCacheMode(PARTITIONED); cacheCfg.setPreloadMode(SYNC); -cacheCfg.setAffinity(new GridCacheConsistentHashAffinityFunction(false, 10)); +cacheCfg.setAffinity(new CacheConsistentHashAffinityFunction(false, 10)); cacheCfg.setBackups(0); return cacheCfg; } @@ -75,7 +75,7 @@ public class GridCachePartitionedUnloadEventsSelfTest extends GridCommonAbstract Collection allKeys = new ArrayList<>(100); -GridCache cache = g1.cache(null); +Cache cache = g1.cache(null); for (int i = 0; i < 100; i++) { cache.put(i, "val"); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteTxConsistencyColocatedRestartSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteTxConsistencyColocatedRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteTxConsistencyColocatedRestartSelfTest.java index 8b9dfe0..dea3855 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteTxConsistencyColocatedRestartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteTxConsistencyColocatedRestartSelfTest.java @@ -30,7 +30,7 @@ public class IgniteTxConsistencyColocatedRestartSelfTest extends IgniteTxConsist } /** {@inheritDoc} */ -@Override protected GridCacheDistributionMode partitionDistributionMode() { -return GridCacheDistributionMode.PARTITIONED_ONLY; +@Override protected CacheDistributionMode partitionDistributionMode() { +return CacheDistributionMode.PARTITIONED_ONLY; } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteTxReentryColocatedSelfTest.java -- diff --git a/modules/core/src/
[08/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java index 76745fe..e8f6dad 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.internal.processors.cache.distributed.near; import org.apache.ignite.cache.*; +import org.apache.ignite.cache.Cache; import org.apache.ignite.cache.store.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.distributed.*; @@ -28,12 +29,11 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.testframework.junits.common.*; -import javax.cache.*; import javax.cache.configuration.*; import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; import static org.apache.ignite.internal.processors.cache.distributed.GridCacheModuloAffinityFunction.*; /** @@ -47,13 +47,13 @@ public class GridCachePartitionedStorePutSelfTest extends GridCommonAbstractTest private static final AtomicInteger CNT = new AtomicInteger(0); /** */ -private GridCache cache1; +private Cache cache1; /** */ -private GridCache cache2; +private Cache cache2; /** */ -private GridCache cache3; +private Cache cache3; /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { @@ -136,7 +136,7 @@ public class GridCachePartitionedStorePutSelfTest extends GridCommonAbstractTest } /** {@inheritDoc} */ -@Override public void write(Cache.Entry e) { +@Override public void write(javax.cache.Cache.Entry e) { // No-op } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxConcurrentGetTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxConcurrentGetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxConcurrentGetTest.java index 0223cd7..fb2fe79 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxConcurrentGetTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxConcurrentGetTest.java @@ -22,7 +22,7 @@ import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Checks multithreaded put/get partitioned cache operations on one node. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java index ce92d57..4b653f8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java @@ -22,7 +22,7 @@ import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite
[17/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java index d3c1744..c605840 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java @@ -33,9 +33,9 @@ import java.util.concurrent.*; import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Basic get and transform store test. @@ -102,7 +102,7 @@ public abstract class GridCacheGetAndTransformStoreAbstractTest extends GridComm /** * @return Distribution mode. */ -protected GridCacheDistributionMode distributionMode() { +protected CacheDistributionMode distributionMode() { return NEAR_PARTITIONED; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGlobalClearAllSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGlobalClearAllSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGlobalClearAllSelfTest.java index 0cc4209..9fd3039 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGlobalClearAllSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGlobalClearAllSelfTest.java @@ -25,11 +25,11 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; import org.apache.ignite.testframework.junits.common.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; /** - * Test {@link org.apache.ignite.cache.GridCache#globalClearAll()} operation in multinode environment with nodes + * Test {@link org.apache.ignite.cache.Cache#globalClearAll()} operation in multinode environment with nodes * having caches with different names. */ public class GridCacheGlobalClearAllSelfTest extends GridCommonAbstractTest { @@ -147,7 +147,7 @@ public class GridCacheGlobalClearAllSelfTest extends GridCommonAbstractTest { // Check cache sizes. for (int i = 0; i < GRID_CNT - 1; i++) { -GridCache cache = grid(i).cache(CACHE_NAME); +Cache cache = grid(i).cache(CACHE_NAME); assertEquals("Key set [i=" + i + ", keys=" + cache.keySet() + ']', KEY_CNT, cache.size()); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockAbstractSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockAbstractSelfTest.java index 89f7234..a4b2845 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockAbstractSelfTest.java @@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.*; import org.apache.ignite.cache.*; +import org.apache.ignite.cache.Cache; import org.apache.ignite.cache.affinity.*; import org.apache.ignite.cache.store.*; import org.apache.ignite.configuration.*; @@ -44,7 +45,7 @@ import java.util.concurrent.atomic.*; import static org.apache.ignite.events.IgniteEventType.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.a
[40/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/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 705a569..893d52a 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java @@ -34,8 +34,8 @@ import java.util.concurrent.*; * Main entry point for all Data Grid APIs. You can get a named cache by calling {@link Ignite#cache(String)} * method. * Functionality - * This API extends {@link org.apache.ignite.cache.GridCacheProjection} API which contains vast majority of cache functionality - * and documentation. In addition to {@link org.apache.ignite.cache.GridCacheProjection} functionality this API provides: + * This API extends {@link org.apache.ignite.cache.CacheProjection} API which contains vast majority of cache functionality + * and documentation. In addition to {@link org.apache.ignite.cache.CacheProjection} functionality this API provides: * * * Various {@code 'loadCache(..)'} methods to load cache either synchronously or asynchronously. @@ -43,13 +43,13 @@ import java.util.concurrent.*; * data based on the optionally passed in arguments. * * - * Method {@link #affinity()} provides {@link org.apache.ignite.cache.affinity.GridCacheAffinityFunction} service for information on + * Method {@link #affinity()} provides {@link org.apache.ignite.cache.affinity.CacheAffinityFunction} service for information on * data partitioning and mapping keys to grid nodes responsible for caching those keys. * * - * Method {@link #dataStructures()} provides {@link org.apache.ignite.cache.datastructures.GridCacheDataStructures} service for + * Method {@link #dataStructures()} provides {@link org.apache.ignite.cache.datastructures.CacheDataStructures} service for * creating and working with distributed concurrent data structures, such as - * {@link IgniteAtomicLong}, {@link IgniteAtomicReference}, {@link org.apache.ignite.cache.datastructures.GridCacheQueue}, etc. + * {@link IgniteAtomicLong}, {@link IgniteAtomicReference}, {@link org.apache.ignite.cache.datastructures.CacheQueue}, etc. * * * Methods like {@code 'tx{Un}Synchronize(..)'} witch allow to get notifications for transaction state changes. @@ -77,7 +77,7 @@ public interface IgniteCache extends javax.cache.Cache, IgniteAsyncS * which is true for near fully populated caches, this method will generally perform significantly * faster with complexity of O(S) where {@code S = 5}. * - * Note that this method is not available on {@link org.apache.ignite.cache.GridCacheProjection} API since it is + * Note that this method is not available on {@link org.apache.ignite.cache.CacheProjection} API since it is * impossible (or very hard) to deterministically return a number value when pre-filtering * and post-filtering is involved (e.g. projection level predicate filters). * @@ -146,14 +146,14 @@ public interface IgniteCache extends javax.cache.Cache, IgniteAsyncS * if there is one. * Cache Flags * This method is not available if any of the following flags are set on projection: - * {@link org.apache.ignite.cache.GridCacheFlag#LOCAL}, {@link org.apache.ignite.cache.GridCacheFlag#READ}. + * {@link org.apache.ignite.cache.CacheFlag#LOCAL}, {@link org.apache.ignite.cache.CacheFlag#READ}. * * @param key Key to store in cache. * @param val Value to be associated with the given key. * @return Previously contained value regardless of whether put happened or not. * @throws NullPointerException If either key or value are {@code null}. * @throws CacheException If put operation failed. - * @throws org.apache.ignite.cache.GridCacheFlagException If projection flags validation failed. + * @throws org.apache.ignite.cache.CacheFlagException If projection flags validation failed. */ @Nullable public V getAndPutIfAbsent(K key, V val) throws CacheException; @@ -223,11 +223,11 @@ public interface IgniteCache extends javax.cache.Cache, IgniteAsyncS * participating in any locks or transactions). * * If {@link CacheConfiguration#isSwapEnabled()} is set to {@code true} and - * {@link org.apache.ignite.cache.GridCacheFlag#SKIP_SWAP} is not enabled, the evicted entry will + * {@link org.apache.ignite.cache.CacheFlag#SKIP_SWAP} is not enabled, the evicted entry will * be swapped to offheap, and then to disk. * Cache Flags * This method is not available if any of the following flags are set on projection: - * {@link org.apache.ignite.cache.GridCacheFlag#READ}. + * {@link org.apache.ignite.cache.Ca
[41/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java -- diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java index 1971b78..d4ad2ce 100644 --- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java +++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java @@ -55,7 +55,7 @@ public final class CacheAtomicSequenceExample { final String seqName = UUID.randomUUID().toString(); // Initialize atomic sequence in grid. -GridCacheAtomicSequence seq = g.cache(CACHE_NAME).dataStructures().atomicSequence(seqName, 0, true); +CacheAtomicSequence seq = g.cache(CACHE_NAME).dataStructures().atomicSequence(seqName, 0, true); // First value of atomic sequence on this node. long firstVal = seq.get(); @@ -96,7 +96,7 @@ public final class CacheAtomicSequenceExample { /** {@inheritDoc} */ @Override public void run() { try { -GridCacheAtomicSequence seq = Ignition.ignite().cache(cacheName).dataStructures(). +CacheAtomicSequence seq = Ignition.ignite().cache(cacheName).dataStructures(). atomicSequence(seqName, 0, true); for (int i = 0; i < RETRIES; i++) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java -- diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java index f049c8e..eb70edd 100644 --- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java +++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java @@ -58,7 +58,7 @@ public final class CacheAtomicStampedExample { String stamp = UUID.randomUUID().toString(); // Initialize atomic stamped in cache. -GridCacheAtomicStamped stamped = g.cache(CACHE_NAME).dataStructures(). +CacheAtomicStamped stamped = g.cache(CACHE_NAME).dataStructures(). atomicStamped(stampedName, val, stamp, true); System.out.println("Atomic stamped initial [value=" + stamped.value() + ", stamp=" + stamped.stamp() + ']'); @@ -119,7 +119,7 @@ public final class CacheAtomicStampedExample { /** {@inheritDoc} */ @Override public void run() { try { -GridCacheAtomicStamped stamped = Ignition.ignite().cache(cacheName).dataStructures(). +CacheAtomicStamped stamped = Ignition.ignite().cache(cacheName).dataStructures(). atomicStamped(stampedName, null, null, true); System.out.println("Atomic stamped [value=" + stamped.value() + ", stamp=" + stamped.stamp() + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java -- diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java index ba3a9f9..495d8ac 100644 --- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java +++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java @@ -55,7 +55,7 @@ public class CacheCountDownLatchExample { final String latchName = UUID.randomUUID().toString(); // Initialize count down latch in grid. -GridCacheCountDownLatch latch = g.cache(CACHE_NAME).dataStructures(). +CacheCountDownLatch latch = g.cache(CACHE_NAME).dataStructures(). countDownLatch(latchName, INITIAL_COUNT, false, true); System.out.println("Latch initial value: " + latch.count()); @@ -97,7 +97,7 @@ public class CacheCountDownLatchExample { /** {@inheritDoc} */ @Override public void run() { try { -GridCacheCountDownLatch latch = Ignition.ignite().cache(cacheName).dataStructures(). +
[22/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java index 9342c5d..f65017a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java @@ -30,18 +30,18 @@ import org.jetbrains.annotations.*; import java.util.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.internal.processors.cache.query.GridCacheQueryType.*; /** * Query adapter. */ -public class GridCacheQueryAdapter implements GridCacheQuery { +public class GridCacheQueryAdapter implements CacheQuery { /** */ private final GridCacheContext cctx; /** */ -private final IgnitePredicate> prjPred; +private final IgnitePredicate> prjPred; /** */ private final GridCacheQueryType type; @@ -103,7 +103,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { */ public GridCacheQueryAdapter(GridCacheContext cctx, GridCacheQueryType type, -@Nullable IgnitePredicate> prjPred, +@Nullable IgnitePredicate> prjPred, @Nullable String clsName, @Nullable String clause, @Nullable IgniteBiPredicate filter, @@ -153,7 +153,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { * @param taskHash Task hash. */ public GridCacheQueryAdapter(GridCacheContext cctx, -IgnitePredicate> prjPred, +IgnitePredicate> prjPred, GridCacheQueryType type, IgniteLogger log, int pageSize, @@ -191,7 +191,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { /** * @return cache projection filter. */ -@Nullable public IgnitePredicate> projectionFilter() { +@Nullable public IgnitePredicate> projectionFilter() { return prjPred; } @@ -261,7 +261,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { } /** {@inheritDoc} */ -@Override public GridCacheQuery pageSize(int pageSize) { +@Override public CacheQuery pageSize(int pageSize) { A.ensure(pageSize > 0, "pageSize > 0"); this.pageSize = pageSize; @@ -277,7 +277,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { } /** {@inheritDoc} */ -@Override public GridCacheQuery timeout(long timeout) { +@Override public CacheQuery timeout(long timeout) { A.ensure(timeout >= 0, "timeout >= 0"); this.timeout = timeout; @@ -293,7 +293,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { } /** {@inheritDoc} */ -@Override public GridCacheQuery keepAll(boolean keepAll) { +@Override public CacheQuery keepAll(boolean keepAll) { this.keepAll = keepAll; return this; @@ -307,7 +307,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { } /** {@inheritDoc} */ -@Override public GridCacheQuery includeBackups(boolean incBackups) { +@Override public CacheQuery includeBackups(boolean incBackups) { this.incBackups = incBackups; return this; @@ -321,7 +321,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { } /** {@inheritDoc} */ -@Override public GridCacheQuery enableDedup(boolean dedup) { +@Override public CacheQuery enableDedup(boolean dedup) { this.dedup = dedup; return this; @@ -335,7 +335,7 @@ public class GridCacheQueryAdapter implements GridCacheQuery { } /** {@inheritDoc} */ -@Override public GridCacheQuery projection(ClusterGroup prj) { +@Override public CacheQuery projection(ClusterGroup prj) { this.prj = prj; return this; @@ -384,21 +384,21 @@ public class GridCacheQueryAdapter implements GridCacheQuery { } /** {@inheritDoc} */ -@Override public GridCacheQueryFuture execute(@Nullable Object... args) { +@Override public CacheQueryFuture execute(@Nullable Object... args) { return execute(null, null, args); } /** {@inheritDoc} */ -@Override public GridCacheQueryFuture execute(IgniteReducer rmtReducer, @Nullable Object... args) { +@Override public CacheQueryFuture execute(IgniteReducer rmtReducer, @Nullable Object... args) { return execute(rmtReducer, null, args); } /** {@inheritDoc} */ -@Override public GridCacheQueryFuture execute(Ignite
[19/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java index 4ff49d7..3ff7c94 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java @@ -71,7 +71,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @param c Test closure. * @throws Exception In case of error. */ -private void runTest(final IgniteInClosure> c) throws Exception { +private void runTest(final IgniteInClosure> c) throws Exception { final IgniteFuture fut1 = GridTestUtils.runMultiThreadedAsync(new CAX() { @Override public void applyx() throws IgniteCheckedException { while (true) { @@ -92,7 +92,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid IgniteFuture fut2 = GridTestUtils.runMultiThreadedAsync(new CA() { @Override public void apply() { -GridCache cache = cache(); +Cache cache = cache(); while (!fut1.isDone()) if (guard.get()) @@ -110,7 +110,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws IgniteCheckedException If failed. */ private void checkConsistency() throws IgniteCheckedException { -for (GridCacheEntry e : cache()) +for (CacheEntry e : cache()) for (int i = 1; i < gridCount(); i++) { Integer val = cache(i).get(e.getKey()); @@ -151,8 +151,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsKey() throws Exception { -runTest(new CI1>() { -@Override public void apply(GridCache cache) { +runTest(new CI1>() { +@Override public void apply(Cache cache) { assert cache.containsKey("key" + random()); assert !cache.containsKey("wrongKey"); } @@ -163,8 +163,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsKeyFiltered() throws Exception { -runTest(new CI1>() { -@Override public void apply(GridCache cache) { +runTest(new CI1>() { +@Override public void apply(Cache cache) { assert cache.projection(F.cacheHasPeekValue()).containsKey("key"); assert !cache.projection(F.cacheNoPeekValue()).containsKey("key" + random()); } @@ -175,8 +175,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsValue() throws Exception { -runTest(new CI1>() { -@Override public void apply(GridCache cache) { +runTest(new CI1>() { +@Override public void apply(Cache cache) { assert cache.containsValue(random()); assert !cache.containsValue(-1); } @@ -187,8 +187,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsValueFiltered() throws Exception { -runTest(new CI1>() { -@Override public void apply(GridCache cache) { +runTest(new CI1>() { +@Override public void apply(Cache cache) { assert cache.projection(F.cacheHasPeekValue()).containsValue(random()); assert !cache.projection(F.cacheNoPeekValue()).containsValue(random()); } @@ -199,10 +199,10 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testForAll() throws Exception { -runTest(new CI1>() { -@Override public void apply(GridCache cache) { -assert cache.forAll(new P1>() { -@Override public boolean apply(GridCacheEntry e) { +runTest(new CI1>() { +@Override public void apply(Cache cache) { +assert cache.forAll(new P1>() { +@Override public boolean apply(CacheEntry e) { Integer val
[51/55] [abbrv] incubator-ignite git commit: # ignite-63
# ignite-63 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/168d7d03 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/168d7d03 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/168d7d03 Branch: refs/heads/ignite-65 Commit: 168d7d033d31057c88d4cde03ba1806c23d44a49 Parents: cafee25 Author: sboikov Authored: Fri Jan 23 15:46:57 2015 +0300 Committer: sboikov Committed: Fri Jan 23 15:47:19 2015 +0300 -- .../examples/datagrid/CacheAffinityExample.java | 6 +- .../examples/datagrid/CacheApiExample.java | 2 +- .../datagrid/CacheContinuousQueryExample.java | 2 +- .../examples/datagrid/CacheEventsExample.java | 2 +- .../datagrid/CachePopularNumbersExample.java| 2 +- .../examples/datagrid/CachePutGetExample.java | 4 +- .../examples/datagrid/CacheQueryExample.java| 14 +- .../datagrid/CacheTransactionExample.java | 2 +- .../starschema/CacheStarSchemaExample.java | 12 +- .../datagrid/store/CacheStoreExample.java | 2 +- .../store/CacheStoreLoadDataExample.java| 4 +- .../store/dummy/CacheDummyPersonStore.java | 4 +- .../client/memcache/MemcacheRestExample.java| 2 +- .../ScalarCacheAffinitySimpleExample.scala | 10 +- .../ignite/client/ClientPutPortableTask.java| 2 +- .../ClientAbstractMultiNodeSelfTest.java| 2 +- .../integration/ClientAbstractSelfTest.java | 10 +- .../rest/AbstractRestProcessorSelfTest.java | 2 +- .../processors/rest/RestProcessorTest.java | 2 +- .../ignite/jdbc/JdbcComplexQuerySelfTest.java | 4 +- .../ignite/jdbc/JdbcLocalCachesSelfTest.java| 4 +- .../ignite/jdbc/JdbcMetadataSelfTest.java | 4 +- .../jdbc/JdbcPreparedStatementSelfTest.java | 2 +- .../ignite/jdbc/JdbcResultSetSelfTest.java | 2 +- .../ignite/jdbc/JdbcStatementSelfTest.java | 2 +- .../src/main/java/org/apache/ignite/Ignite.java | 6 +- .../apache/ignite/IgniteBasicWarmupClosure.java | 22 +- .../java/org/apache/ignite/IgniteCache.java | 2 +- .../org/apache/ignite/IgniteDataLoader.java | 2 +- .../java/org/apache/ignite/cache/Cache.java | 278 --- .../apache/ignite/cache/CacheConfiguration.java | 2 +- .../org/apache/ignite/cache/CacheEntry.java | 2 +- .../org/apache/ignite/cache/CacheMBean.java | 2 +- .../org/apache/ignite/cache/CacheMetrics.java | 2 +- .../apache/ignite/cache/CacheProjection.java| 8 +- .../java/org/apache/ignite/cache/GridCache.java | 278 +++ .../datastructures/CacheDataStructures.java | 2 +- .../random/CacheRandomEvictionPolicy.java | 2 +- .../cache/store/CacheLoadOnlyStoreAdapter.java | 6 +- .../apache/ignite/cache/store/CacheStore.java | 4 +- .../ignite/cache/store/CacheStoreAdapter.java | 2 +- .../java/org/apache/ignite/internal/GridEx.java | 8 +- .../org/apache/ignite/internal/GridKernal.java | 10 +- .../internal/managers/GridManagerAdapter.java | 2 +- .../processors/cache/GridCacheAdapter.java | 8 +- .../processors/cache/GridCacheEntryImpl.java| 2 +- .../processors/cache/GridCacheMBeanAdapter.java | 2 +- .../processors/cache/GridCacheProcessor.java| 22 +- .../cache/GridCacheProjectionImpl.java | 4 +- .../processors/cache/GridCacheProxy.java| 2 +- .../processors/cache/GridCacheProxyImpl.java| 2 +- .../cache/GridCacheWriteBehindStore.java| 2 +- .../GridCacheDataStructuresManager.java | 10 +- .../cache/datastructures/GridCacheSetImpl.java | 2 +- .../cache/query/GridCacheQueryManager.java | 8 +- .../jdbc/GridCacheQueryJdbcMetadataTask.java| 2 +- .../query/jdbc/GridCacheQueryJdbcTask.java | 2 +- .../dataload/GridDataLoadCacheUpdaters.java | 16 +- .../processors/fs/GridGgfsDataManager.java | 2 +- .../processors/fs/GridGgfsMetaManager.java | 2 +- .../processors/fs/IgniteFsProcessor.java| 2 +- .../handlers/cache/GridCacheCommandHandler.java | 2 +- .../processors/task/GridTaskProcessor.java | 2 +- .../ignite/internal/visor/cache/VisorCache.java | 4 +- .../visor/cache/VisorCacheClearTask.java| 2 +- .../visor/cache/VisorCacheCompactTask.java | 2 +- .../visor/cache/VisorCacheLoadTask.java | 2 +- .../visor/cache/VisorCacheMetadataTask.java | 2 +- .../internal/visor/cache/VisorCacheMetrics.java | 2 +- .../cache/VisorCacheMetricsCollectorTask.java | 4 +- .../visor/cache/VisorCachePreloadTask.java | 2 +- .../visor/cache/VisorCacheResetMetricsTask.java | 2 +- .../visor/cache/VisorCacheSwapBackupsTask.java | 2 +- .../visor/node/VisorNodeDataCollectorJob.java | 2 +- .../internal/visor/query/VisorQueryTask.java| 2 +- .../org/ap
[28/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/query/GridCacheQuerySqlField.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/GridCacheQuerySqlField.java b/modules/core/src/main/java/org/apache/ignite/cache/query/GridCacheQuerySqlField.java deleted file mode 100644 index 8d95753..000 --- a/modules/core/src/main/java/org/apache/ignite/cache/query/GridCacheQuerySqlField.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache.query; - -import java.lang.annotation.*; - -/** - * Annotates fields for SQL queries. All fields that will be involved in SQL clauses must have - * this annotation. For more information about cache queries see {@link GridCacheQuery} documentation. - * @see GridCacheQuery - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD}) -public @interface GridCacheQuerySqlField { -/** - * Specifies whether cache should maintain an index for this field or not. - * Just like with databases, field indexing may require additional overhead - * during updates, but makes select operations faster. - * - * When indexing SPI and indexed field is - * of type {@code com.vividsolutions.jts.geom.Geometry} (or any subclass of this class) then GridGain will - * consider this index as spatial providing performance boost for spatial queries. - * - * @return {@code True} if index must be created for this field in database. - */ -boolean index() default false; - -/** - * Specifies whether index should be unique or not. This property only - * makes sense if {@link #index()} property is set to {@code true}. - * - * @return {@code True} if field index should be unique. - * @deprecated No longer supported, will be ignored. - */ -@Deprecated -boolean unique() default false; - -/** - * Specifies whether index should be in descending order or not. This property only - * makes sense if {@link #index()} property is set to {@code true}. - * - * @return {@code True} if field index should be in descending order. - */ -boolean descending() default false; - -/** - * Array of index groups this field belongs to. Groups are used for compound indexes, - * whenever index should be created on more than one field. All fields within the same - * group will belong to the same index. - * - * Group indexes are needed because SQL engine can utilize only one index per table occurrence in a query. - * For example if we have two separate indexes on fields {@code a} and {@code b} of type {@code X} then - * query {@code select * from X where a = ? and b = ?} will use for filtering either index on field {@code a} - * or {@code b} but not both. For more effective query execution here it is preferable to have a single - * group index on both fields. - * - * For more complex scenarios please refer to {@link GridCacheQuerySqlField.Group} documentation. - * - * @return Array of group names. - */ -String[] groups() default {}; - -/** - * Array of ordered index groups this field belongs to. For more information please refer to - * {@linkplain GridCacheQuerySqlField.Group} documentation. - * - * @return Array of ordered group indexes. - * @see #groups() - */ -Group[] orderedGroups() default {}; - -/** - * Property name. If not provided then field name will be used. - * - * @return Name of property. - */ -String name() default ""; - -/** - * Describes group of index and position of field in this group. - * - * Opposite to {@link #groups()} this annotation gives control over order of fields in a group index. - * This can be needed in scenarios when we have a query like - * {@code select * from X where a = ? and b = ? order by b desc}. If we have index {@code (a asc, b asc)} - * sorting on {@code b} will be performed. Here it is preferable to h
[48/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java index 11d1d00..be7babc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java @@ -32,6 +32,7 @@ import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.testframework.junits.common.*; import org.jetbrains.annotations.*; +import javax.cache.*; import javax.cache.configuration.*; import javax.cache.integration.*; import java.util.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java index 3cc4602..91b20fe 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java @@ -102,8 +102,8 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest { public void testLuceneIndex() throws Exception { final Ignite g = startGrid(0); -final Cache cache1 = g.cache("local1"); -final Cache cache2 = g.cache("local2"); +final GridCache cache1 = g.cache("local1"); +final GridCache cache2 = g.cache("local2"); final AtomicInteger threadIdxGen = new AtomicInteger(); @@ -159,8 +159,8 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest { public void testLuceneIndex1() throws Exception { final Ignite g = startGrid(0); -final Cache cache1 = g.cache("local1"); -final Cache cache2 = g.cache("local2"); +final GridCache cache1 = g.cache("local1"); +final GridCache cache2 = g.cache("local2"); final AtomicInteger threadIdxGen = new AtomicInteger(); @@ -230,8 +230,8 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest { public void testLuceneIndex2() throws Exception { final Ignite g = startGrid(0); -final Cache cache1 = g.cache("local1"); -final Cache cache2 = g.cache("local2"); +final GridCache cache1 = g.cache("local1"); +final GridCache cache2 = g.cache("local2"); final AtomicInteger threadIdxGen = new AtomicInteger(); @@ -303,8 +303,8 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest { public void testLuceneIndex3() throws Exception { final Ignite g = startGrid(0); -final Cache cache1 = g.cache("local1"); -final Cache cache2 = g.cache("local2"); +final GridCache cache1 = g.cache("local1"); +final GridCache cache2 = g.cache("local2"); final AtomicInteger threadIdxGen = new AtomicInteger(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java index bbf605f..81b0ce2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java @@ -209,16 +209,16 @@ public class GridCacheMemoryModeSelfTest extends GridCommonAbstractTest { final int all = cache + offheapSwap; // put -doTest(cache, offheapSwap, offheapEmpty, swapEmpty, new CIX1>() { -@Override public void applyx(Cache c) throws IgniteCheckedException { +doTest(cache, offheapSwap, offheapEmpty, swapEmpty, new CIX1>() { +@Override public void applyx(GridCache c) throws IgniteCheckedException { for (int i = 0; i < all; i++) c.put(valueOf(i), i); } }); //putAll -doTest(cache, offheapSw
[12/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheExpiredEntriesPreloadAbstractSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheExpiredEntriesPreloadAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheExpiredEntriesPreloadAbstractSelfTest.java index a378db7..ce53047 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheExpiredEntriesPreloadAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheExpiredEntriesPreloadAbstractSelfTest.java @@ -30,7 +30,7 @@ import javax.cache.expiry.*; import java.util.*; import static java.util.concurrent.TimeUnit.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; import static org.apache.ignite.events.IgniteEventType.*; /** @@ -75,7 +75,7 @@ public abstract class GridCacheExpiredEntriesPreloadAbstractSelfTest extends Gri * @throws Exception If failed. */ public void testExpiredEntriesPreloading() throws Exception { -GridCache cache0 = cache(0); +Cache cache0 = cache(0); final int KEYS_NUM = 3; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java index d5ba673..9cf3c0d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java @@ -32,9 +32,9 @@ import java.util.*; import java.util.concurrent.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Test cases for multi-threaded tests. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java index 014878d..372c4db 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java @@ -45,7 +45,7 @@ public class GridCacheMixedModeSelfTest extends GridCommonAbstractTest { cfg.setCacheMode(CacheMode.PARTITIONED); if (F.eq(gridName, getTestGridName(0))) -cfg.setDistributionMode(GridCacheDistributionMode.NEAR_ONLY); +cfg.setDistributionMode(CacheDistributionMode.NEAR_ONLY); return cfg; } @@ -64,7 +64,7 @@ public class GridCacheMixedModeSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testBasicOps() throws Exception { -GridCache cache = grid(0).cache(null); +Cache cache = grid(0).cache(null); for (int i = 0; i < 1000; i++) cache.put(i, i); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheModuloAffinityFunction.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheModuloAffinityFunction.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheModuloAffinityFunction.java index 1cad96a..5f07043 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distrib
[29/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java new file mode 100644 index 000..9f1cb91 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java @@ -0,0 +1,203 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.cache.query; + +import java.io.*; +import java.util.*; + +/** + * Query configuration object. + */ +public class CacheQueryConfiguration implements Serializable { +/** */ +private static final long serialVersionUID = 0L; + +/** Collection of query type metadata. */ +private Collection typeMeta; + +/** Query type resolver. */ +private CacheQueryTypeResolver typeRslvr; + +/** */ +private boolean idxPrimitiveKey; + +/** */ +private boolean idxPrimitiveVal; + +/** */ +private boolean idxFixedTyping; + +/** */ +private boolean escapeAll; + +/** + * Default constructor. + */ +public CacheQueryConfiguration() { +// No-op. +} + +/** + * @param cfg Configuration to copy. + */ +public CacheQueryConfiguration(CacheQueryConfiguration cfg) { +typeMeta = cfg.getTypeMetadata(); +typeRslvr = cfg.getTypeResolver(); +idxPrimitiveKey = cfg.isIndexPrimitiveKey(); +idxPrimitiveVal = cfg.isIndexPrimitiveValue(); +idxFixedTyping = cfg.isIndexFixedTyping(); +escapeAll = cfg.isEscapeAll(); +} + +/** + * Gets collection of query type metadata objects. + * + * @return Collection of query type metadata. + */ +public Collection getTypeMetadata() { +return typeMeta; +} + +/** + * Sets collection of query type metadata objects. + * + * @param typeMeta Collection of query type metadata. + */ +public void setTypeMetadata(Collection typeMeta) { +this.typeMeta = typeMeta; +} + +/** + * Gets query type resolver. + * + * @return Query type resolver. + */ +public CacheQueryTypeResolver getTypeResolver() { +return typeRslvr; +} + +/** + * Sets query type resolver. + * + * @param typeRslvr Query type resolver. + */ +public void setTypeResolver(CacheQueryTypeResolver typeRslvr) { +this.typeRslvr = typeRslvr; +} + +/** + * Gets flag indicating whether SQL engine should index by key in cases + * where key is primitive type + * + * @return {@code True} if primitive keys should be indexed. + */ +public boolean isIndexPrimitiveKey() { +return idxPrimitiveKey; +} + +/** + * Sets flag indicating whether SQL engine should index by key in cases + * where key is primitive type. + * + * @param idxPrimitiveKey {@code True} if primitive keys should be indexed. + */ +public void setIndexPrimitiveKey(boolean idxPrimitiveKey) { +this.idxPrimitiveKey = idxPrimitiveKey; +} + +/** + * Gets flag indicating whether SQL engine should index by value in cases + * where value is primitive type + * + * @return {@code True} if primitive values should be indexed. + */ +public boolean isIndexPrimitiveValue() { +return idxPrimitiveVal; +} + +/** + * Sets flag indexing whether SQL engine should index by value in cases + * where value is primitive type. + * + * @param idxPrimitiveVal {@code True} if primitive values should be indexed. + */ +public void setIndexPrimitiveValue(boolean idxPrimitiveVal) { +this.idxPrimitiveVal = idxPrimitiveVal; +} + +/** + * This flag essentially controls whether all values of the same type have + * identical key type. + * + * If {@code false}, SQL engine will store all keys in BINARY form to make it possible to store + * the same value type with different key types.
[33/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/GridCachePartitionFairAffinity.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/GridCachePartitionFairAffinity.java b/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/GridCachePartitionFairAffinity.java deleted file mode 100644 index 9f65dc7..000 --- a/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/GridCachePartitionFairAffinity.java +++ /dev/null @@ -1,805 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache.affinity.fair; - -import org.apache.ignite.cache.*; -import org.apache.ignite.cache.affinity.*; -import org.apache.ignite.cluster.*; -import org.apache.ignite.events.*; -import org.apache.ignite.lang.*; -import org.apache.ignite.internal.util.typedef.*; -import org.apache.ignite.internal.util.typedef.internal.*; - -import java.io.*; -import java.util.*; - -/** - * Fair affinity function which tries to ensure that all nodes get equal number of partitions with - * minimum amount of reassignments between existing nodes. - * - * Cache affinity can be configured for individual caches via {@link CacheConfiguration#getAffinity()} method. - */ -@GridCacheCentralizedAffinityFunction -public class GridCachePartitionFairAffinity implements GridCacheAffinityFunction { -/** Default partition count. */ -public static final int DFLT_PART_CNT = 256; - -/** */ -private static final long serialVersionUID = 0L; - -/** Ascending comparator. */ -private static final Comparator ASC_CMP = new PartitionSetComparator(false); - -/** Descending comparator. */ -private static final Comparator DESC_CMP = new PartitionSetComparator(true); - -/** */ -private int parts; - -/** - * Creates fair affinity with default partition count. - */ -public GridCachePartitionFairAffinity() { -this(DFLT_PART_CNT); -} - -/** - * @param parts Number of partitions. - */ -public GridCachePartitionFairAffinity(int parts) { -this.parts = parts; -} - -/** {@inheritDoc} */ -@Override public List> assignPartitions(GridCacheAffinityFunctionContext ctx) { -List topSnapshot = ctx.currentTopologySnapshot(); - -if (topSnapshot.size() == 1) { -ClusterNode primary = topSnapshot.get(0); - -List> assignments = new ArrayList<>(parts); - -for (int i = 0; i < parts; i++) -assignments.add(Collections.singletonList(primary)); - -return assignments; -} - -IgniteBiTuple>, Map> cp = createCopy(ctx, topSnapshot); - -List> assignment = cp.get1(); - -int tiers = Math.min(ctx.backups() + 1, topSnapshot.size()); - -// Per tier pending partitions. -Map> pendingParts = new HashMap<>(); - -FullAssignmentMap fullMap = new FullAssignmentMap(tiers, assignment, topSnapshot); - -for (int tier = 0; tier < tiers; tier++) { -// Check if this is a new tier and add pending partitions. -Queue pending = pendingParts.get(tier); - -for (int part = 0; part < parts; part++) { -if (fullMap.assignments.get(part).size() < tier + 1) { -if (pending == null) { -pending = new LinkedList<>(); - -pendingParts.put(tier, pending); -} - -if (!pending.contains(part)) -pending.add(part); - -} -} - -// Assign pending partitions, if any. -assignPending(tier, pendingParts, fullMap, topSnapshot); - -// Balance assignments. -balance(tier, pendingParts, fullMap, topSnapshot); -} - -return fullMap.assignments; -} - -/** {@inheritDoc} */ -@Override public void reset() { -// No-op. -} - -/** {@inheritDoc} */ -@Override public int partitions() { -return parts; -} - -/** {@inherit
[26/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java index a71aaec..021167f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java @@ -137,7 +137,7 @@ public interface GridCacheEntryEx { * @param prjAware {@code true} if entry should inherit projection properties. * @return Wrapped entry. */ -public GridCacheEntry wrap(boolean prjAware); +public CacheEntry wrap(boolean prjAware); /** * Wraps this map entry into cache entry for filter evaluation inside entry lock. @@ -145,12 +145,12 @@ public interface GridCacheEntryEx { * @return Wrapped entry. * @throws IgniteCheckedException If failed. */ -public GridCacheEntry wrapFilterLocked() throws IgniteCheckedException; +public CacheEntry wrapFilterLocked() throws IgniteCheckedException; /** * @return Entry which is safe to pass into eviction policy. */ -public GridCacheEntry evictWrap(); +public CacheEntry evictWrap(); /** * @return Not-null version if entry is obsolete. @@ -198,7 +198,7 @@ public interface GridCacheEntryEx { * @throws IgniteCheckedException If swap could not be released. * @throws GridCacheEntryRemovedException If entry was removed. */ -public boolean invalidate(@Nullable IgnitePredicate>[] filter) +public boolean invalidate(@Nullable IgnitePredicate>[] filter) throws GridCacheEntryRemovedException, IgniteCheckedException; /** @@ -209,7 +209,7 @@ public interface GridCacheEntryEx { * @throws IgniteCheckedException If operation failed. * @return {@code true} if entry was not being used and could be removed. */ -public boolean compact(@Nullable IgnitePredicate>[] filter) +public boolean compact(@Nullable IgnitePredicate>[] filter) throws GridCacheEntryRemovedException, IgniteCheckedException; /** @@ -220,7 +220,7 @@ public interface GridCacheEntryEx { * @throws IgniteCheckedException In case of error. */ public boolean evictInternal(boolean swap, GridCacheVersion obsoleteVer, -@Nullable IgnitePredicate>[] filter) throws IgniteCheckedException; +@Nullable IgnitePredicate>[] filter) throws IgniteCheckedException; /** * Evicts entry when batch evict is performed. When called, does not write entry data to swap, but instead @@ -301,7 +301,7 @@ public interface GridCacheEntryEx { UUID subjId, Object transformClo, String taskName, -IgnitePredicate>[] filter, +IgnitePredicate>[] filter, @Nullable IgniteCacheExpiryPolicy expiryPlc) throws IgniteCheckedException, GridCacheEntryRemovedException, GridCacheFilterFailedException; @@ -313,7 +313,7 @@ public interface GridCacheEntryEx { * @throws IgniteCheckedException If reload failed. * @throws GridCacheEntryRemovedException If entry has been removed. */ -@Nullable public V innerReload(IgnitePredicate>... filter) throws IgniteCheckedException, +@Nullable public V innerReload(IgnitePredicate>... filter) throws IgniteCheckedException, GridCacheEntryRemovedException; /** @@ -351,7 +351,7 @@ public interface GridCacheEntryEx { boolean evt, boolean metrics, long topVer, -IgnitePredicate>[] filter, +IgnitePredicate>[] filter, GridDrType drType, long drExpireTime, @Nullable GridCacheVersion explicitVer, @@ -387,7 +387,7 @@ public interface GridCacheEntryEx { boolean evt, boolean metrics, long topVer, -IgnitePredicate>[] filter, +IgnitePredicate>[] filter, GridDrType drType, @Nullable GridCacheVersion explicitVer, @Nullable UUID subjId, @@ -442,7 +442,7 @@ public interface GridCacheEntryEx { boolean metrics, boolean primary, boolean checkVer, -@Nullable IgnitePredicate>[] filter, +@Nullable IgnitePredicate>[] filter, GridDrType drType, long drTtl, long drExpireTime, @@ -483,7 +483,7 @@ public interface GridCacheEntryEx { @Nullable ExpiryPolicy expiryPlc, boolean evt, boolean metrics, -@Nullable IgnitePredicate>[] filter, +@Nullable IgnitePredicate>[] filter, boolean intercept, @Nullable UUID subjId, String taskName @@ -501,7 +501,7 @@ public interface GridCacheEntryEx {
[27/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java index dc3d929..ccc8af7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java @@ -59,7 +59,7 @@ import java.util.concurrent.locks.*; import static java.util.Collections.*; import static org.apache.ignite.IgniteSystemProperties.*; import static org.apache.ignite.events.IgniteEventType.*; -import static org.apache.ignite.cache.GridCacheFlag.*; +import static org.apache.ignite.cache.CacheFlag.*; import static org.apache.ignite.cache.GridCachePeekMode.*; import static org.apache.ignite.transactions.IgniteTxConcurrency.*; import static org.apache.ignite.transactions.IgniteTxIsolation.*; @@ -71,7 +71,7 @@ import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKe * Adapter for different cache implementations. */ @SuppressWarnings("unchecked") -public abstract class GridCacheAdapter implements GridCache, +public abstract class GridCacheAdapter implements Cache, GridCacheProjectionEx, Externalizable { /** */ private static final long serialVersionUID = 0L; @@ -151,13 +151,13 @@ public abstract class GridCacheAdapter implements GridCache, protected IgniteLogger log; /** Queries impl. */ -private GridCacheQueries qry; +private CacheQueries qry; /** Data structures impl. */ -private GridCacheDataStructures dataStructures; +private CacheDataStructures dataStructures; /** Affinity impl. */ -private GridCacheAffinity aff; +private CacheAffinity aff; /** Whether this cache is GGFS data cache. */ private boolean ggfsDataCache; @@ -344,33 +344,33 @@ public abstract class GridCacheAdapter implements GridCache, public abstract GridCachePreloader preloader(); /** {@inheritDoc} */ -@Override public GridCacheQueries queries() { +@Override public CacheQueries queries() { return qry; } /** {@inheritDoc} */ -@Override public GridCacheAffinity affinity() { +@Override public CacheAffinity affinity() { return aff; } /** {@inheritDoc} */ -@Override public GridCacheDataStructures dataStructures() { +@Override public CacheDataStructures dataStructures() { return dataStructures; } /** {@inheritDoc} */ @SuppressWarnings({"unchecked", "RedundantCast"}) -@Override public GridCache cache() { -return (GridCache)this; +@Override public Cache cache() { +return (Cache)this; } /** {@inheritDoc} */ -@Override public Set flags() { +@Override public Set flags() { return F.asSet(ctx.forcedFlags()); } /** {@inheritDoc} */ -@Override public IgnitePredicate> predicate() { +@Override public IgnitePredicate> predicate() { return null; } @@ -389,7 +389,7 @@ public abstract class GridCacheAdapter implements GridCache, } /** {@inheritDoc} */ -@Override public GridCacheProjection flagsOn(@Nullable GridCacheFlag[] flags) { +@Override public CacheProjection flagsOn(@Nullable CacheFlag[] flags) { if (F.isEmpty(flags)) return this; @@ -406,12 +406,12 @@ public abstract class GridCacheAdapter implements GridCache, } /** {@inheritDoc} */ -@Override public GridCacheProjection flagsOff(@Nullable GridCacheFlag[] flags) { +@Override public CacheProjection flagsOff(@Nullable CacheFlag[] flags) { return this; } /** {@inheritDoc} */ -@Override public GridCacheProjection keepPortable() { +@Override public CacheProjection keepPortable() { GridCacheProjectionImpl prj = keepPortable0(); return new GridCacheProxyImpl<>((GridCacheContext)ctx, prj, prj); @@ -424,7 +424,7 @@ public abstract class GridCacheAdapter implements GridCache, */ public GridCacheProjectionImpl keepPortable0() { return new GridCacheProjectionImpl<>( -(GridCacheProjection)this, +(CacheProjection)this, (GridCacheContext)ctx, null, null, @@ -455,7 +455,7 @@ public abstract class GridCacheAdapter implements GridCache, /** {@inheritDoc} */ @SuppressWarnings({"unchecked", "RedundantCast"}) -@Override public GridCacheProjection projection( +@Override public CacheProjection projection( Class keyType, Class valType ) { @@ -472,7 +472,7 @@ public abstract class GridCacheAdapter implement
[25/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java index 70bd5d0..c5b1a46 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java @@ -72,11 +72,11 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx cctx; /** Queries impl. */ -private GridCacheQueries qry; +private CacheQueries qry; /** Flags. */ @GridToStringInclude -private Set flags; +private Set flags; /** Client ID which operates over this projection, if any, */ private UUID subjId; @@ -103,11 +103,11 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx parent, +CacheProjection parent, GridCacheContext cctx, @Nullable IgniteBiPredicate kvFilter, -@Nullable IgnitePredicate> entryFilter, -@Nullable Set flags, +@Nullable IgnitePredicate> entryFilter, +@Nullable Set flags, @Nullable UUID subjId, boolean keepPortable, @Nullable ExpiryPolicy expiryPlc) { @@ -119,9 +119,9 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx f = this.flags; +Set f = this.flags; this.flags = Collections.unmodifiableSet(f); @@ -157,7 +157,7 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx> entryFilter(boolean noNulls) { +IgnitePredicate> entryFilter(boolean noNulls) { return noNulls ? noNullEntryFilter : withNullEntryFilter; } @@ -190,9 +190,9 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx> and( -IgnitePredicate> filter, boolean noNulls) { -IgnitePredicate> entryFilter = entryFilter(noNulls); +IgnitePredicate> and( +IgnitePredicate> filter, boolean noNulls) { +IgnitePredicate> entryFilter = entryFilter(noNulls); if (filter == null) return entryFilter; @@ -249,9 +249,9 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx> and(@Nullable final IgnitePredicate>[] f1, +private IgnitePredicate> and(@Nullable final IgnitePredicate>[] f1, boolean nonNulls) { -IgnitePredicate> entryFilter = entryFilter(nonNulls); +IgnitePredicate> entryFilter = entryFilter(nonNulls); if (F.isEmpty(f1)) return entryFilter; @@ -264,8 +264,8 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx e, boolean noNulls) { -GridCacheFlag[] f = cctx.forceLocalRead(); +boolean isAll(CacheEntry e, boolean noNulls) { +CacheFlag[] f = cctx.forceLocalRead(); try { return F.isAll(e, entryFilter(noNulls)); @@ -285,7 +285,7 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx p = kvFilter(noNulls); if (p != null) { -GridCacheFlag[] f = cctx.forceLocalRead(); +CacheFlag[] f = cctx.forceLocalRead(); try { if (!p.apply(k, v)) @@ -344,9 +344,9 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx> visitor(final IgniteInClosure> vis) { -return new CI1>() { -@Override public void apply(GridCacheEntry e) { +private IgniteInClosure> visitor(final IgniteInClosure> vis) { +return new CI1>() { +@Override public void apply(CacheEntry e) { if (isAll(e, true)) vis.apply(e); } @@ -359,9 +359,9 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx> visitor(final IgnitePredicate> vis) { -return new P1>() { -@Override public boolean apply(GridCacheEntry e) { +private IgnitePredicate> visitor(final IgnitePredicate> vis) { +return new P1>() { +@Override public boolean apply(CacheEntry e) { // If projection filter didn't pass, go to the next element. // Otherwise, delegate to the visitor. return !isAll(e, true) || vis.apply(e); @@ -371,12 +371,12 @@ public class GridCacheProjectionImpl implements GridCacheProjectionEx GridCache cache() { -return (GridCache)cctx.cache(); +@Override public Cache cache() { +return (Cache)cctx.cache(); } /** {@inheritDoc} */ -@Override public GridCacheQueries queries() { +@Override public CacheQueries queries() { return qry; } @@ -407,7 +407,7 @@ public class GridCacheProjectionImpl implements Gr
[04/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestMain.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestMain.java b/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestMain.java index 4d8539c..0a8c6e9 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestMain.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestMain.java @@ -43,7 +43,7 @@ public class GridTestMain { // Initialize Spring factory. try (Ignite g = G.start((IgniteConfiguration)ctx.getBean("grid.cfg"))) { -final GridCache cache = g.cache("partitioned"); +final Cache cache = g.cache("partitioned"); assert cache != null; @@ -71,7 +71,7 @@ public class GridTestMain { Ignite g = G.ignite(); -final GridCache cache = g.cache("partitioned"); +final Cache cache = g.cache("partitioned"); final BlockingQueue q = new ArrayBlockingQueue<>(400); @@ -133,7 +133,7 @@ public class GridTestMain { long start = System.currentTimeMillis(); -final GridCache cache = G.ignite().cache("partitioned"); +final Cache cache = G.ignite().cache("partitioned"); // Collocate computations and data. for (long i = 0; i < GridTestConstants.ENTRY_COUNT; i++) { @@ -164,7 +164,7 @@ public class GridTestMain { * @param cache Cache to load. * @throws IgniteCheckedException If failed. */ -private static void loadFromStore(GridCache cache) throws IgniteCheckedException { +private static void loadFromStore(Cache cache) throws IgniteCheckedException { cache.loadCache(null, 0, GridTestConstants.LOAD_THREADS, GridTestConstants.ENTRY_COUNT); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/spring-colocation.xml -- diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/spring-colocation.xml b/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/spring-colocation.xml index d4b39c5..71355a5 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/spring-colocation.xml +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/spring-colocation.xml @@ -127,7 +127,7 @@ sets the number of backups to 1 (which is default). --> - + http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/loadtests/continuous/GridContinuousOperationsLoadTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/continuous/GridContinuousOperationsLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/continuous/GridContinuousOperationsLoadTest.java index d539dd6..9e39b77 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/continuous/GridContinuousOperationsLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/continuous/GridContinuousOperationsLoadTest.java @@ -39,7 +39,7 @@ import static org.apache.ignite.testframework.GridLoadTestUtils.*; import static org.apache.ignite.testframework.GridTestUtils.*; /** - * Load test for {@link org.apache.ignite.cache.query.GridCacheContinuousQuery}. + * Load test for {@link org.apache.ignite.cache.query.CacheContinuousQuery}. */ public class GridContinuousOperationsLoadTest { /** @@ -78,7 +78,7 @@ public class GridContinuousOperationsLoadTest { dumpProperties(System.out); try (Ignite ignite = Ignition.start(cfgPath)) { -final GridCache cache = ignite.cache(cacheName); +final Cache cache = ignite.cache(cacheName); if (cache == null) throw new IgniteCheckedException("Cache is not configured: " + cacheName); @@ -96,7 +96,7 @@ public class GridContinuousOperationsLoadTest { for (int i = 0; i < parallelCnt; i++) { if (useQry) { -GridCacheContinuousQuery qry = cache.queries().createContinuousQuery(); +CacheContinuousQuery qry = cache.queries().createContinuousQuery(); qry.callback(new PX2>>() { @Override public boolean applyx(UUID uuid, Collection> entries) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/
[35/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/GridCacheWriteSynchronizationMode.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/GridCacheWriteSynchronizationMode.java b/modules/core/src/main/java/org/apache/ignite/cache/GridCacheWriteSynchronizationMode.java deleted file mode 100644 index 4585ea9..000 --- a/modules/core/src/main/java/org/apache/ignite/cache/GridCacheWriteSynchronizationMode.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache; - -import org.apache.ignite.transactions.*; -import org.jetbrains.annotations.*; - -/** - * Mode indicating how GridGain should wait for write replies from other nodes. Default - * value is {@link #FULL_ASYNC}}, which means that GridGain will not wait for responses from - * participating nodes. This means that by default remote nodes may get their state updated slightly after - * any of the cache write methods complete, or after {@link IgniteTx#commit()} method completes. - * - * Note that regardless of write synchronization mode, cache data will always remain fully - * consistent across all participating nodes. - * - * Write synchronization mode may be configured via {@link org.apache.ignite.cache.CacheConfiguration#getWriteSynchronizationMode()} - * configuration property. - */ -public enum GridCacheWriteSynchronizationMode { -/** - * Flag indicating that GridGain should wait for write or commit replies from all nodes. - * This behavior guarantees that whenever any of the atomic or transactional writes - * complete, all other participating nodes which cache the written data have been updated. - */ -FULL_SYNC, - -/** - * Flag indicating that GridGain will not wait for write or commit responses from participating nodes, - * which means that remote nodes may get their state updated a bit after any of the cache write methods - * complete, or after {@link IgniteTx#commit()} method completes. - */ -FULL_ASYNC, - -/** - * This flag only makes sense for {@link CacheMode#PARTITIONED} mode. When enabled, GridGain - * will wait for write or commit to complete on {@code primary} node, but will not wait for - * backups to be updated. - */ -PRIMARY_SYNC; - -/** Enumerated values. */ -private static final GridCacheWriteSynchronizationMode[] VALS = values(); - -/** - * Efficiently gets enumerated value from its ordinal. - * - * @param ord Ordinal value. - * @return Enumerated value or {@code null} if ordinal out of range. - */ -@Nullable public static GridCacheWriteSynchronizationMode fromOrdinal(int ord) { -return ord >= 0 && ord < VALS.length ? VALS[ord] : null; -} -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/affinity/CacheAffinity.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/affinity/CacheAffinity.java b/modules/core/src/main/java/org/apache/ignite/cache/affinity/CacheAffinity.java new file mode 100644 index 000..dc81a20 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/affinity/CacheAffinity.java @@ -0,0 +1,262 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific languag
[06/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java index 93b97ca..39ce99d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java @@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration; import org.apache.ignite.cache.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; /** @@ -43,7 +43,7 @@ public class IgniteCacheTxLoaderWriterTest extends IgniteCacheLoaderWriterAbstra } /** {@inheritDoc} */ -@Override protected GridCacheDistributionMode distributionMode() { +@Override protected CacheDistributionMode distributionMode() { return PARTITIONED_ONLY; } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java index f4b02b1..c709386 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java @@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration; import org.apache.ignite.cache.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; /** @@ -43,7 +43,7 @@ public class IgniteCacheTxLocalLoadAllTest extends IgniteCacheLoadAllAbstractTes } /** {@inheritDoc} */ -@Override protected GridCacheDistributionMode distributionMode() { +@Override protected CacheDistributionMode distributionMode() { return PARTITIONED_ONLY; } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java index 519374c..65c36c9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java @@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration; import org.apache.ignite.cache.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; /** @@ -43,7 +43,7 @@ public class IgniteCacheTxLocalNoLoadPreviousValueTest extends IgniteCacheNoLoad } /** {@inheritDoc} */ -@Override protected GridCacheDistributionMode distributionMode() { +@Override protected CacheDistributionMode distributionMode() { return PARTITIONED_ONLY; } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/int
[34/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/affinity/GridCacheAffinityKeyMapper.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/affinity/GridCacheAffinityKeyMapper.java b/modules/core/src/main/java/org/apache/ignite/cache/affinity/GridCacheAffinityKeyMapper.java deleted file mode 100644 index f168e0e..000 --- a/modules/core/src/main/java/org/apache/ignite/cache/affinity/GridCacheAffinityKeyMapper.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache.affinity; - -import org.apache.ignite.cache.*; - -import java.io.*; - -/** - * Affinity mapper which maps cache key to an affinity key. Affinity key is a key which will be - * used to determine a node on which this key will be cached. Every cache key will first be passed - * through {@link #affinityKey(Object)} method, and the returned value of this method - * will be given to {@link GridCacheAffinityFunction} implementation to find out key-to-node affinity. - * - * The default implementation, which will be used if no explicit affinity mapper is specified - * in cache configuration, will first look for any field or method annotated with - * {@link GridCacheAffinityKeyMapped @GridCacheAffinityKeyMapped} annotation. If such field or method - * is not found, then the cache key itself will be returned from {@link #affinityKey(Object) affinityKey(Object)} - * method (this means that all objects with the same cache key will always be routed to the same node). - * If such field or method is found, then the value of this field or method will be returned from - * {@link #affinityKey(Object) affinityKey(Object)} method. This allows to specify alternate affinity key, other - * than the cache key itself, whenever needed. - * - * A custom (other than default) affinity mapper can be provided - * via {@link CacheConfiguration#getAffinityMapper()} configuration property. - * - * For more information on affinity mapping and examples refer to {@link GridCacheAffinityFunction} and - * {@link GridCacheAffinityKeyMapped @GridCacheAffinityKeyMapped} documentation. - * @see GridCacheAffinityFunction - * @see GridCacheAffinityKeyMapped - */ -public interface GridCacheAffinityKeyMapper extends Serializable { -/** - * Maps passed in key to an alternate key which will be used for node affinity. - * - * @param key Key to map. - * @return Key to be used for node-to-affinity mapping (may be the same - * key as passed in). - */ -public Object affinityKey(Object key); - -/** - * Resets cache affinity mapper to its initial state. This method will be called by - * the system any time the affinity mapper has been sent to remote node where - * it has to be reinitialized. If your implementation of affinity mapper - * has no initialization logic, leave this method empty. - */ -public void reset(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/affinity/GridCacheAffinityNodeAddressHashResolver.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/affinity/GridCacheAffinityNodeAddressHashResolver.java b/modules/core/src/main/java/org/apache/ignite/cache/affinity/GridCacheAffinityNodeAddressHashResolver.java deleted file mode 100644 index 85570f1..000 --- a/modules/core/src/main/java/org/apache/ignite/cache/affinity/GridCacheAffinityNodeAddressHashResolver.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LI
[07/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java index 37f6c90..925e829 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java @@ -33,7 +33,7 @@ import java.util.*; import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; import static org.apache.ignite.transactions.IgniteTxConcurrency.*; import static org.apache.ignite.transactions.IgniteTxIsolation.*; @@ -83,10 +83,10 @@ public class GridCacheDistributedEvictionsSelfTest extends GridCommonAbstractTes cc.setSwapEnabled(false); - cc.setWriteSynchronizationMode(GridCacheWriteSynchronizationMode.FULL_SYNC); + cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); // Set only DHT policy, leave default near policy. -cc.setEvictionPolicy(new GridCacheFifoEvictionPolicy<>(10)); +cc.setEvictionPolicy(new CacheFifoEvictionPolicy<>(10)); cc.setEvictSynchronized(evictSync); cc.setEvictNearSynchronized(evictNearSync); cc.setEvictSynchronizedKeyBufferSize(1); @@ -167,7 +167,7 @@ public class GridCacheDistributedEvictionsSelfTest extends GridCommonAbstractTes Ignite g = startGrid(0); -final GridCache cache = g.cache(null); +final Cache cache = g.cache(null); for (int i = 1; i < 20; i++) { cache.putx(i * gridCnt, i * gridCnt); @@ -183,7 +183,7 @@ public class GridCacheDistributedEvictionsSelfTest extends GridCommonAbstractTes Ignite ignite = grid(0); -final GridCache cache = ignite.cache(null); +final Cache cache = ignite.cache(null); // Put 1 entry to primary node. cache.putx(0, 0); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java index 25bfc7a..66e7cce 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java @@ -19,11 +19,12 @@ package org.apache.ignite.internal.processors.cache.eviction; import org.apache.ignite.*; import org.apache.ignite.cache.*; +import org.apache.ignite.cache.Cache; import org.apache.ignite.cache.store.*; import org.apache.ignite.configuration.*; import org.apache.ignite.transactions.*; -import org.apache.ignite.cache.eviction.GridCacheEvictionPolicy; -import org.apache.ignite.cache.eviction.fifo.GridCacheFifoEvictionPolicy; +import org.apache.ignite.cache.eviction.CacheEvictionPolicy; +import org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy; import org.apache.ignite.cache.store.CacheStore; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; @@ -32,7 +33,6 @@ import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import javax.cache.*; import javax.cache.configuration.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; @@ -45,10 +45,10 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** */ -private GridCacheEvictionPolicy plc; +private CacheEvictionPolicy plc; /** */ -private GridCacheEvictionPolicy nearPlc; +private CacheEvictionPolicy nearPlc; /** Test store. */ private CacheStore testStore; @@ -77,8 +77,8 @@ public abstra
[47/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheMultiNodeDataStructureTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheMultiNodeDataStructureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheMultiNodeDataStructureTest.java index 8c743f6..b739318 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheMultiNodeDataStructureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheMultiNodeDataStructureTest.java @@ -57,7 +57,7 @@ public class GridCacheMultiNodeDataStructureTest { * @throws IgniteCheckedException If failed. */ private static void sample(Ignite g, String cacheName) throws IgniteCheckedException { -Cache cache = g.cache(cacheName); +GridCache cache = g.cache(cacheName); CacheAtomicLong atomicLong = cache.dataStructures().atomicLong("keygen", 0, true); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java index 2b8b06e..a480880 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java @@ -278,7 +278,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon info("Queue name: " + queueName); -Cache c = grid(0).cache(null); +GridCache c = grid(0).cache(null); CacheQueue queue = c.dataStructures().queue(queueName, QUEUE_CAPACITY, false, true); @@ -372,7 +372,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon futs.add(GridTestUtils.runMultiThreadedAsync(new Callable() { @Override public Void call() throws Exception { -Cache cache = grid(idx).cache(null); +GridCache cache = grid(idx).cache(null); CacheQueue queue = cache.dataStructures().queue(queueName, 0, collocated, true); @@ -387,7 +387,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon for (IgniteFuture fut : futs) fut.get(); -Cache cache = grid(0).cache(null); +GridCache cache = grid(0).cache(null); CacheQueue queue = cache.dataStructures().queue(queueName, 0, collocated, true); @@ -443,7 +443,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon putFuts.add(GridTestUtils.runMultiThreadedAsync(new Callable() { @Override public Void call() throws Exception { -Cache cache = grid(idx).cache(null); +GridCache cache = grid(idx).cache(null); CacheQueue queue = cache.dataStructures().queue(queueName, 0, collocated, true); @@ -461,7 +461,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon pollFuts.add(GridTestUtils.runAsync(new Callable() { @Override public Void call() throws Exception { -Cache cache = grid(idx).cache(null); +GridCache cache = grid(idx).cache(null); CacheQueue queue = cache.dataStructures().queue(queueName, 0, collocated, true); @@ -487,7 +487,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon for (IgniteFuture fut : pollFuts) fut.get(); -Cache cache = grid(0).cache(null); +GridCache cache = grid(0).cache(null); CacheQueue queue = cache.dataStructures().queue(queueName, 0, collocated, true); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java -- diff --git
[38/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java new file mode 100644 index 000..cfbfb85 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java @@ -0,0 +1,1912 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.cache; + +import org.apache.ignite.*; +import org.apache.ignite.cache.query.*; +import org.apache.ignite.cache.store.*; +import org.apache.ignite.cluster.*; +import org.apache.ignite.lang.*; +import org.apache.ignite.transactions.*; +import org.jetbrains.annotations.*; + +import java.sql.*; +import java.util.*; +import java.util.Date; +import java.util.concurrent.*; + +/** + * This interface provides a rich API for working with distributed caches. It includes the following + * main functionality: + * + * + * Various {@code 'get(..)'} methods to synchronously or asynchronously get values from cache. + * All {@code 'get(..)'} methods are transactional and will participate in an ongoing transaction + * if there is one. + * + * + * Various {@code 'put(..)'}, {@code 'putIfAbsent(..)'}, and {@code 'replace(..)'} methods to + * synchronously or asynchronously put single or multiple entries into cache. + * All these methods are transactional and will participate in an ongoing transaction + * if there is one. + * + * + * Various {@code 'remove(..)'} methods to synchronously or asynchronously remove single or multiple keys + * from cache. All {@code 'remove(..)'} methods are transactional and will participate in an ongoing transaction + * if there is one. + * + * + * Various {@code 'contains(..)'} method to check if cache contains certain keys or values locally. + * + * + * Various {@code 'forEach(..)'}, {@code 'forAny(..)'}, and {@code 'reduce(..)'} methods to visit + * every local cache entry within this projection. + * + * + * Various {@code flagsOn(..)'}, {@code 'flagsOff(..)'}, and {@code 'projection(..)'} methods to + * set specific flags and filters on a cache projection. + * + * + * Methods like {@code 'keySet(..)'}, {@code 'values(..)'}, and {@code 'entrySet(..)'} to provide + * views on cache keys, values, and entries. + * + * + * Various {@code 'peek(..)'} methods to peek at values in global or transactional memory, swap + * storage, or persistent storage. + * + * + * Various {@code 'reload(..)'} methods to reload latest values from persistent storage. + * + * + * Various {@code 'promote(..)'} methods to load specified keys from swap storage into + * global cache memory. + * + * + * Various {@code 'lock(..)'}, {@code 'unlock(..)'}, and {@code 'isLocked(..)'} methods to acquire, release, + * and check on distributed locks on a single or multiple keys in cache. All locking methods + * are not transactional and will not enlist keys into ongoing transaction, if any. + * + * + * Various {@code 'clear(..)'} methods to clear elements from cache, and optionally from + * swap storage. All {@code 'clear(..)'} methods are not transactional and will not enlist cleared + * keys into ongoing transaction, if any. + * + * + * Various {@code 'evict(..)'} methods to evict elements from cache, and optionally store + * them in underlying swap storage for later access. All {@code 'evict(..)'} methods are not + * transactional and will not enlist evicted keys into ongoing transaction, if any. + * + * + * Various {@code 'txStart(..)'} methods to perform various cache + * operations within a transaction (see {@link IgniteTx} for more information). + * + * + * {@link #queries()} method to get an instance of {@link org.apache.ignite.cache.query.CacheQueries} service for working + * with distributed cache queries. + * + * + * Various {@code 'gridProjection(..)'} methods which provide {@link org.apache.ignite.cluster.ClusterGroup} only + * for nodes on which given keys reside. All {@code 'g
[02/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java index 39f6073..a5fc80b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java @@ -39,7 +39,7 @@ import java.util.concurrent.atomic.*; import static org.apache.ignite.configuration.IgniteDeploymentMode.*; import static org.apache.ignite.events.IgniteEventType.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; import static org.apache.ignite.cache.GridCachePeekMode.*; @@ -123,7 +123,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { CacheConfiguration cacheCfg = defaultCacheConfiguration(); - cacheCfg.setWriteSynchronizationMode(GridCacheWriteSynchronizationMode.FULL_SYNC); + cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); cacheCfg.setSwapEnabled(true); cacheCfg.setCacheMode(PARTITIONED); cacheCfg.setBackups(1); @@ -136,7 +136,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { cacheCfg.setEvictionPolicy(null); -GridCacheQueryConfiguration qcfg = new GridCacheQueryConfiguration(); +CacheQueryConfiguration qcfg = new CacheQueryConfiguration(); qcfg.setIndexPrimitiveKey(true); qcfg.setIndexPrimitiveValue(true); @@ -192,8 +192,8 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @return Cache to use in tests. * @throws Exception If failed. */ -private GridCache populate() throws Exception { -GridCache cache = grid(0).cache(null); +private Cache populate() throws Exception { +Cache cache = grid(0).cache(null); assertEquals(0, cache.size()); assertEquals(0, cache.offHeapEntriesCount()); @@ -213,7 +213,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { assert val != null; assert val == i; -GridCacheEntry entry = cache.entry(i); +CacheEntry entry = cache.entry(i); assert entry != null; @@ -263,9 +263,9 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @param cache Cache. * @throws Exception In case of error. */ -private void checkEntries(GridCacheProjection cache) throws Exception { +private void checkEntries(CacheProjection cache) throws Exception { for (long i = from; i < to; i++) { -GridCacheEntry entry = cache.entry(i); +CacheEntry entry = cache.entry(i); assert entry != null; assert entry.getKey() != null; @@ -343,7 +343,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testIterators() throws Exception { -GridCache cache = populate(); +Cache cache = populate(); int cnt = 0; @@ -381,7 +381,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testSql() throws Exception { -GridCache cache = populate(); +Cache cache = populate(); Collection> res = cache.queries(). createSqlQuery(Long.class, "_val >= ? and _val < ?"). @@ -407,12 +407,12 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { } /** - * Tests {@link GridCacheProjection#promote(Object)} behavior on offheaped entries. + * Tests {@link org.apache.ignite.cache.CacheProjection#promote(Object)} behavior on offheaped entries. * * @throws Exception If failed. */ public void testUnswap() throws Exception { -GridCache cache = populate(); +Cache cache = populate(); for (long i = from; i < to; i++) { Long val = cache.promote(i); @@ -438,7 +438,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testUnswapAll() throws Exception { -GridCache cache = populate(); +Cache cache = populate(); Collection k
[05/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderPerformanceTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderPerformanceTest.java index 11bf0e3..25dee29 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderPerformanceTest.java @@ -31,8 +31,8 @@ import java.util.concurrent.*; import static org.apache.ignite.events.IgniteEventType.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Data loader performance test. Compares group lock data loader to traditional lock. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java index cddfd81..f652a65 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java @@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.dataload; import org.apache.ignite.*; import org.apache.ignite.cache.*; +import org.apache.ignite.cache.Cache; import org.apache.ignite.cache.eviction.fifo.*; import org.apache.ignite.cache.store.*; import org.apache.ignite.configuration.*; @@ -32,7 +33,6 @@ import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.testframework.junits.common.*; import org.jetbrains.annotations.*; -import javax.cache.*; import javax.cache.configuration.*; import java.util.*; import java.util.concurrent.*; @@ -40,9 +40,9 @@ import java.util.concurrent.atomic.*; import static java.util.concurrent.TimeUnit.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; import static org.apache.ignite.events.IgniteEventType.*; /** @@ -100,7 +100,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest { cc.setDistributionMode(nearEnabled ? NEAR_PARTITIONED : PARTITIONED_ONLY); cc.setWriteSynchronizationMode(FULL_SYNC); -cc.setEvictionPolicy(new GridCacheFifoEvictionPolicy(1)); +cc.setEvictionPolicy(new CacheFifoEvictionPolicy(1)); cc.setEvictSynchronized(false); cc.setEvictNearSynchronized(false); @@ -638,7 +638,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest { try { Ignite g = startGrid(); -final GridCache c = g.cache(null); +final Cache c = g.cache(null); final IgniteDataLoader ldr = g.dataLoader(null); @@ -690,7 +690,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest { try { Ignite g = startGrid(); -GridCache c = g.cache(null); +Cache c = g.cache(null); IgniteDataLoader ldr = g.dataLoader(null); @@ -735,7 +735,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest { } }, EVT_CACHE_OBJECT_PUT); -GridCache c = g.cache(null); +Cache c = g.cache(null); assertTrue(c.isEmpty()); @@ -871,7 +871,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ -@Override public void write(Cache.Entry entry) { +@Override public void write(javax.cache.Cache.Entry entry) { storeMap.put(entry.getKey(), entry.getValue()); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modu
[23/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java index ede8115..405e29c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java @@ -40,8 +40,8 @@ import java.util.concurrent.*; import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.*; -import static org.apache.ignite.cache.GridCacheFlag.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheFlag.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; import static org.apache.ignite.internal.processors.cache.GridCacheOperation.*; /** @@ -111,10 +111,10 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter private long topVer; /** Optional filter. */ -private final IgnitePredicate>[] filter; +private final IgnitePredicate>[] filter; /** Write synchronization mode. */ -private final GridCacheWriteSynchronizationMode syncMode; +private final CacheWriteSynchronizationMode syncMode; /** If this future mapped to single node. */ private volatile Boolean single; @@ -182,7 +182,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter public GridNearAtomicUpdateFuture( GridCacheContext cctx, GridDhtAtomicCache cache, -GridCacheWriteSynchronizationMode syncMode, +CacheWriteSynchronizationMode syncMode, GridCacheOperation op, Collection keys, @Nullable Collection vals, @@ -193,7 +193,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter final boolean rawRetval, @Nullable GridCacheEntryEx cached, @Nullable ExpiryPolicy expiryPlc, -final IgnitePredicate>[] filter, +final IgnitePredicate>[] filter, UUID subjId, int taskNameHash ) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java index d1f2692..99907a4 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java @@ -64,7 +64,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage im private long topVer; /** Write synchronization mode. */ -private GridCacheWriteSynchronizationMode syncMode; +private CacheWriteSynchronizationMode syncMode; /** Update operation. */ private GridCacheOperation op; @@ -115,7 +115,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage im /** Filter. */ @GridDirectTransient -private IgnitePredicate>[] filter; +private IgnitePredicate>[] filter; /** Filter bytes. */ private byte[][] filterBytes; @@ -168,13 +168,13 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage im boolean fastMap, @Nullable GridCacheVersion updateVer, long topVer, -GridCacheWriteSynchronizationMode syncMode, +CacheWriteSynchronizationMode syncMode, GridCacheOperation op, boolean retval, boolean forceTransformBackups, @Nullable ExpiryPolicy expiryPlc, @Nullable Object[] invokeArgs, -@Nullable IgnitePredicate>[] filter, +@Nullable IgnitePredicate>[] filter, @Nullable UUID subjId, int taskNameHash ) { @@ -263,7 +263,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage im /** * @return Cache write synchronization mode. */ -public GridCacheWriteSynchronizationMode writeSynchronizationMode() { +public CacheWriteSynchronizationMode writeSynchronizationMode() { return syncMode; } @@ -284,7 +2
[16/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateSelfTest.java index 7d60f25..42283ac 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateSelfTest.java @@ -20,14 +20,14 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.cache.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; /** * */ public class GridCacheMultinodeUpdateSelfTest extends GridCacheMultinodeUpdateAbstractSelfTest { /** {@inheritDoc} */ -@Override protected GridCacheDistributionMode distributionMode() { +@Override protected CacheDistributionMode distributionMode() { return PARTITIONED_ONLY; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java index f7fb614..2a28d4b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java @@ -60,7 +60,7 @@ public class GridCacheMvccManagerSelfTest extends GridCommonAbstractTest { CacheConfiguration cfg = defaultCacheConfiguration(); cfg.setCacheMode(mode); - cfg.setWriteSynchronizationMode(GridCacheWriteSynchronizationMode.FULL_SYNC); + cfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); cfg.setAtomicityMode(TRANSACTIONAL); return cfg; @@ -95,7 +95,7 @@ public class GridCacheMvccManagerSelfTest extends GridCommonAbstractTest { try { Ignite ignite = startGridsMultiThreaded(gridCnt); -GridCache cache = ignite.cache(null); +Cache cache = ignite.cache(null); IgniteTx tx = cache.txStart(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java index 473be26..e0bc3e4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java @@ -29,7 +29,7 @@ import java.util.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; /** * Test cases for multi-threaded tests in partitioned cache. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java index ecb3cda..444da3e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*; -import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.t
[14/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicLongApiSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicLongApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicLongApiSelfTest.java index 37bc281..3cf6f32 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicLongApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicLongApiSelfTest.java @@ -30,10 +30,10 @@ import org.apache.ignite.testframework.junits.common.*; import java.util.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Cache atomic long api test. @@ -125,7 +125,7 @@ public class GridCacheAtomicLongApiSelfTest extends GridCommonAbstractTest { private void createRemove(String cacheName) throws Exception { info("Running test [name=" + getName() + ", cache=" + cacheName + ']'); -GridCache cache = grid().cache(cacheName); +Cache cache = grid().cache(cacheName); assertNotNull(cache); assertEquals(0, cache.primarySize()); @@ -134,9 +134,9 @@ public class GridCacheAtomicLongApiSelfTest extends GridCommonAbstractTest { String atomicName2 = "SECOND"; -GridCacheAtomicLong atomic1 = cache.dataStructures().atomicLong(atomicName1, 0, true); -GridCacheAtomicLong atomic2 = cache.dataStructures().atomicLong(atomicName2, 0, true); -GridCacheAtomicLong atomic3 = cache.dataStructures().atomicLong(atomicName1, 0, true); +CacheAtomicLong atomic1 = cache.dataStructures().atomicLong(atomicName1, 0, true); +CacheAtomicLong atomic2 = cache.dataStructures().atomicLong(atomicName2, 0, true); +CacheAtomicLong atomic3 = cache.dataStructures().atomicLong(atomicName1, 0, true); assertNotNull(atomic1); assertNotNull(atomic2); @@ -183,12 +183,12 @@ public class GridCacheAtomicLongApiSelfTest extends GridCommonAbstractTest { private void incrementAndGet(String cacheName) throws Exception { info("Running test [name=" + getName() + ", cache=" + cacheName + ']'); -GridCache cache = grid().cache(cacheName); +Cache cache = grid().cache(cacheName); assertNotNull(cache); assertEquals(0, cache.primarySize()); -GridCacheAtomicLong atomic = cache.dataStructures().atomicLong("atomic", 0, true); +CacheAtomicLong atomic = cache.dataStructures().atomicLong("atomic", 0, true); assertEquals(0, cache.primarySize()); @@ -216,12 +216,12 @@ public class GridCacheAtomicLongApiSelfTest extends GridCommonAbstractTest { private void getAndIncrement(String cacheName) throws Exception { info("Running test [name=" + getName() + ", cache=" + cacheName + ']'); -GridCache cache = grid().cache(cacheName); +Cache cache = grid().cache(cacheName); assertNotNull(cache); assertEquals(0, cache.primarySize()); -GridCacheAtomicLong atomic = cache.dataStructures().atomicLong("atomic", 0, true); +CacheAtomicLong atomic = cache.dataStructures().atomicLong("atomic", 0, true); assertEquals(0, cache.primarySize()); @@ -249,12 +249,12 @@ public class GridCacheAtomicLongApiSelfTest extends GridCommonAbstractTest { private void decrementAndGet(String cacheName) throws Exception { info("Running test [name=" + getName() + ", cache=" + cacheName + ']'); -GridCache cache = grid().cache(cacheName); +Cache cache = grid().cache(cacheName); assertNotNull(cache); assertEquals(0, cache.primarySize()); -GridCacheAtomicLong atomic = cache.dataStructures().atomicLong("atomic", 0, true); +CacheAtomicLong atomic = cache.dataStructures().atomicLong("atomic", 0, true); assertEquals(0, cache.primarySize()); @@ -282,12 +282,12 @@ public class GridCacheAtomicLongApiSelfTest extends GridCommonAbstractTest { private void getAndDecrement(String cacheName) throws Exception { info("Running test [name=" + getName() + ", cache=" + cacheName + ']'); -GridCache cache = grid().cache(cacheName); +Ca
[31/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/datastructures/GridCacheDataStructureInvalidException.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/datastructures/GridCacheDataStructureInvalidException.java b/modules/core/src/main/java/org/apache/ignite/cache/datastructures/GridCacheDataStructureInvalidException.java deleted file mode 100644 index dfde5de..000 --- a/modules/core/src/main/java/org/apache/ignite/cache/datastructures/GridCacheDataStructureInvalidException.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache.datastructures; - -import org.apache.ignite.*; -import org.jetbrains.annotations.*; - -/** - * This checked exception gets thrown if attempt to access an invalid data structure has been made. - * Data structure may become invalid if communication with remote nodes has been lost or - * any other error condition happened that prevented from insuring consistent state. - * - * The best way to handle this error is to discard the invalid data structure instance and try - * getting the underlying data structure from cache again. - * - * Note that data structures throw runtime exceptions out of methods that don't have - * checked exceptions in the signature. - */ -public class GridCacheDataStructureInvalidException extends IgniteCheckedException { -/** */ -private static final long serialVersionUID = 0L; - -/** - * Creates new exception with given error message. - * - * @param msg Error message. - */ -public GridCacheDataStructureInvalidException(String msg) { -super(msg); -} - -/** - * Creates new exception with given throwable as a nested cause and - * source of error message. - * - * @param cause Non-null throwable cause. - */ -public GridCacheDataStructureInvalidException(Throwable cause) { -this(cause.getMessage(), cause); -} - -/** - * Creates a new exception with given error message and optional nested cause exception. - * - * @param msg Error message. - * @param cause Optional nested exception (can be {@code null}). - */ -public GridCacheDataStructureInvalidException(String msg, @Nullable Throwable cause) { -super(msg, cause); -} -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/datastructures/GridCacheDataStructureInvalidRuntimeException.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/datastructures/GridCacheDataStructureInvalidRuntimeException.java b/modules/core/src/main/java/org/apache/ignite/cache/datastructures/GridCacheDataStructureInvalidRuntimeException.java deleted file mode 100644 index 7ca87e1..000 --- a/modules/core/src/main/java/org/apache/ignite/cache/datastructures/GridCacheDataStructureInvalidRuntimeException.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache.datastructures; - -import org.apache.ignite.*; -import org.jetbrains.annotations.*; - -/** - * This runtime exception gets thrown if attempt to access an invalid data structure has been made. - * Da
[11/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java index 7059e47..fee7183 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java @@ -37,8 +37,8 @@ import java.util.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; import static org.apache.ignite.events.IgniteEventType.*; /** @@ -69,7 +69,7 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT CacheConfiguration cacheCfg = defaultCacheConfiguration(); cacheCfg.setCacheMode(PARTITIONED); - cacheCfg.setWriteSynchronizationMode(GridCacheWriteSynchronizationMode.FULL_SYNC); + cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); cacheCfg.setSwapEnabled(false); cacheCfg.setEvictSynchronized(true); cacheCfg.setEvictNearSynchronized(true); @@ -81,8 +81,8 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT // Set eviction queue size explicitly. cacheCfg.setEvictSynchronizedKeyBufferSize(1); cacheCfg.setEvictMaxOverflowRatio(0); -cacheCfg.setEvictionPolicy(new GridCacheFifoEvictionPolicy(10)); -cacheCfg.setNearEvictionPolicy(new GridCacheFifoEvictionPolicy(10)); +cacheCfg.setEvictionPolicy(new CacheFifoEvictionPolicy(10)); +cacheCfg.setNearEvictionPolicy(new CacheFifoEvictionPolicy(10)); cfg.setCacheConfiguration(cacheCfg); @@ -167,8 +167,8 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT * @param idx Index. * @return Affinity. */ -private GridCacheConsistentHashAffinityFunction affinity(int idx) { -return (GridCacheConsistentHashAffinityFunction)grid(idx).cache(null).configuration().getAffinity(); +private CacheConsistentHashAffinityFunction affinity(int idx) { +return (CacheConsistentHashAffinityFunction)grid(idx).cache(null).configuration().getAffinity(); } /** @@ -176,7 +176,7 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT * @return Primary node for the given key. */ private Collection keyNodes(Object key) { -GridCacheConsistentHashAffinityFunction aff = affinity(0); +CacheConsistentHashAffinityFunction aff = affinity(0); return aff.nodes(aff.partition(key), grid(0).nodes(), 1); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java index ce5825a..fab65a9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java @@ -38,8 +38,8 @@ import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; import static org.apache.ignite.events.IgniteEventType.*; /** @@ -71,7 +71,7 @@ public class GridCacheDhtEvictionSelfTest extends GridCommonAbstractTest { cacheCfg.setCacheMode(PARTITIONED); cacheCfg.setPreloadMode(NONE); - cacheCfg.setWriteSynchronizationMode(GridCacheWriteSynchronizationMode.FULL_SYNC); +
[15/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java index 470030a..14247b7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java @@ -32,7 +32,7 @@ import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; /** * Test for cache swap preloading. @@ -61,7 +61,7 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest { CacheConfiguration cacheCfg = defaultCacheConfiguration(); - cacheCfg.setWriteSynchronizationMode(GridCacheWriteSynchronizationMode.FULL_SYNC); + cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); cacheCfg.setSwapEnabled(true); cacheCfg.setCacheMode(cacheMode); cacheCfg.setPreloadMode(SYNC); @@ -96,7 +96,7 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest { try { startGrid(0); -GridCache cache = grid(0).cache(null); +Cache cache = grid(0).cache(null); // Populate. for (int i = 0; i < ENTRY_CNT; i++) @@ -154,7 +154,7 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest { try { startGrid(0); -final GridCache cache = grid(0).cache(null); +final Cache cache = grid(0).cache(null); assertNotNull(cache); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java index 1cccdc0..902b45e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java @@ -32,7 +32,6 @@ import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.testframework.junits.common.*; -import javax.cache.*; import javax.cache.configuration.*; import java.util.*; import java.util.concurrent.*; @@ -40,7 +39,7 @@ import java.util.concurrent.*; import static java.util.concurrent.TimeUnit.*; import static org.apache.ignite.events.IgniteEventType.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Test that swap is released after entry is reloaded. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java index a61c24c..cffcf6e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java @@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.*; import org.apache.ignite.cache.*; -import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.lang.*; import org.apache.ignite.internal.processors.cache.transactions.*; import org.apache.ignite.internal.processors.dr.*; @@ -116,7 +115,7 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter impleme } /** {@inheritDoc} */ -@Nullable @Override public GridCacheEntry evictWrap() { +@Nullable @Override public CacheEntry evictWrap() { return null; } @@ -337,12 +336,12 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter impleme
[32/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicReference.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicReference.java b/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicReference.java new file mode 100644 index 000..ec0d827 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicReference.java @@ -0,0 +1,93 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.cache.datastructures; + +import org.apache.ignite.*; + +/** + * This interface provides a rich API for working with distributed atomic reference. + * + * Functionality + * Distributed atomic reference includes the following main functionality: + * + * + * Method {@link #get()} synchronously gets current value of an atomic reference. + * + * + * Method {@link #set(Object)} synchronously and unconditionally sets the value in the an atomic reference. + * + * + * Methods {@code compareAndSet(...)} synchronously and conditionally set the value in the an atomic reference. + * + * + * All previously described methods have asynchronous analogs. + * + * + * Method {@link #name()} gets name of atomic reference. + * + * + * Creating Distributed Atomic Reference + * Instance of distributed atomic reference can be created by calling the following method: + * + * {@link CacheDataStructures#atomicReference(String, Object, boolean)} + * + * @see CacheDataStructures#atomicReference(String, Object, boolean) + * @see CacheDataStructures#removeAtomicReference(String) + */ +public interface CacheAtomicReference { +/** + * Name of atomic reference. + * + * @return Name of an atomic reference. + */ +public String name(); + +/** + * Gets current value of an atomic reference. + * + * @return current value of an atomic reference. + * @throws IgniteCheckedException If operation failed. + */ +public T get() throws IgniteCheckedException; + +/** + * Unconditionally sets the value. + * + * @param val Value. + * @throws IgniteCheckedException If operation failed. + */ +public void set(T val) throws IgniteCheckedException; + +/** + * Conditionally sets the new value. That will be set if {@code expVal} is equal + * to current value respectively. + * + * @param expVal Expected value. + * @param newVal New value. + * @return Result of operation execution. If {@code true} than value have been updated. + * @throws IgniteCheckedException If operation failed. + */ +public boolean compareAndSet(T expVal, T newVal) throws IgniteCheckedException; + +/** + * Gets status of atomic. + * + * @return {@code true} if an atomic reference was removed from cache, {@code false} otherwise. + */ +public boolean removed(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicSequence.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicSequence.java b/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicSequence.java new file mode 100644 index 000..09ef416 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/datastructures/CacheAtomicSequence.java @@ -0,0 +1,130 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing,
[30/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/GridCacheGgfsPerBlockLruEvictionPolicy.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/GridCacheGgfsPerBlockLruEvictionPolicy.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/GridCacheGgfsPerBlockLruEvictionPolicy.java deleted file mode 100644 index a2ca603..000 --- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/GridCacheGgfsPerBlockLruEvictionPolicy.java +++ /dev/null @@ -1,353 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache.eviction.ggfs; - -import org.apache.ignite.*; -import org.apache.ignite.cache.*; -import org.apache.ignite.cache.eviction.*; -import org.apache.ignite.fs.*; -import org.apache.ignite.internal.processors.fs.*; -import org.jdk8.backport.*; -import org.jdk8.backport.ConcurrentLinkedDeque8.*; -import org.jetbrains.annotations.*; - -import java.util.*; -import java.util.concurrent.atomic.*; -import java.util.regex.*; - -/** - * GGFS eviction policy which evicts particular blocks. - */ -public class GridCacheGgfsPerBlockLruEvictionPolicy implements GridCacheEvictionPolicy, -GridCacheGgfsPerBlockLruEvictionPolicyMBean { -/** Meta denoting node in the queue. */ -public static final String META_NODE = "ggfs_node"; - -/** Maximum size. When reached, eviction begins. */ -private volatile long maxSize; - -/** Maximum amount of blocks. When reached, eviction begins. */ -private volatile int maxBlocks; - -/** Collection of regex for paths which must not be evicted. */ -private volatile Collection excludePaths; - -/** Exclusion patterns. */ -private volatile Collection excludePatterns; - -/** Whether patterns must be recompiled during the next call. */ -private final AtomicBoolean excludeRecompile = new AtomicBoolean(true); - -/** Queue. */ -private final ConcurrentLinkedDeque8> queue = -new ConcurrentLinkedDeque8<>(); - -/** Current size of all enqueued blocks in bytes. */ -private final LongAdder curSize = new LongAdder(); - -/** - * Default constructor. - */ -public GridCacheGgfsPerBlockLruEvictionPolicy() { -// No-op. -} - -/** - * Constructor. - * - * @param maxSize Maximum size. When reached, eviction begins. - * @param maxBlocks Maximum amount of blocks. When reached, eviction begins. - */ -public GridCacheGgfsPerBlockLruEvictionPolicy(long maxSize, int maxBlocks) { -this(maxSize, maxBlocks, null); -} - -/** - * Constructor. - * - * @param maxSize Maximum size. When reached, eviction begins. - * @param maxBlocks Maximum amount of blocks. When reached, eviction begins. - * @param excludePaths Collection of regex for path which must not be evicted. - */ -public GridCacheGgfsPerBlockLruEvictionPolicy(long maxSize, int maxBlocks, -@Nullable Collection excludePaths) { -this.maxSize = maxSize; -this.maxBlocks = maxBlocks; -this.excludePaths = excludePaths; -} - -/** {@inheritDoc} */ -@Override public void onEntryAccessed(boolean rmv, GridCacheEntry entry) { -if (!rmv) { -if (!entry.isCached()) -return; - -if (touch(entry)) -shrink(); -} -else { -MetaEntry meta = entry.removeMeta(META_NODE); - -if (meta != null && queue.unlinkx(meta.node())) -changeSize(-meta.size()); -} -} - -/** - * @param entry Entry to touch. - * @return {@code True} if new node has been added to queue by this call. - */ -private boolean touch(GridCacheEntry entry) { -byte[] val = entry.peek(); - -int blockSize = val != null ? val.length : 0; - -MetaEntry meta = entry.meta(META_NODE); - -// Entry has not been enqueued yet. -if (meta == null) { -while (true) { -Node> node = queue.offerLastx(entry); - -
[50/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java b/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java new file mode 100644 index 000..d86b221 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java @@ -0,0 +1,278 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.cache; + +import org.apache.ignite.*; +import org.apache.ignite.cache.affinity.*; +import org.apache.ignite.cache.datastructures.*; +import org.apache.ignite.cache.store.CacheStore; +import org.apache.ignite.lang.*; +import org.apache.ignite.transactions.*; +import org.jetbrains.annotations.*; + +import java.util.*; + +/** + * Main entry point for all Data Grid APIs. You can get a named cache by calling {@link org.apache.ignite.Ignite#cache(String)} + * method. + * Functionality + * This API extends {@link CacheProjection} API which contains vast majority of cache functionality + * and documentation. In addition to {@link CacheProjection} functionality this API provides: + * + * + * Various {@code 'loadCache(..)'} methods to load cache either synchronously or asynchronously. + * These methods don't specify any keys to load, and leave it to the underlying storage to load cache + * data based on the optionally passed in arguments. + * + * + * Method {@link #affinity()} provides {@link org.apache.ignite.cache.affinity.CacheAffinityFunction} service for information on + * data partitioning and mapping keys to grid nodes responsible for caching those keys. + * + * + * Method {@link #dataStructures()} provides {@link org.apache.ignite.cache.datastructures.CacheDataStructures} service for + * creating and working with distributed concurrent data structures, such as + * {@link org.apache.ignite.cache.datastructures.CacheAtomicLong}, {@link org.apache.ignite.cache.datastructures.CacheAtomicReference}, {@link org.apache.ignite.cache.datastructures.CacheQueue}, etc. + * + * + * Methods like {@code 'tx{Un}Synchronize(..)'} witch allow to get notifications for transaction state changes. + * This feature is very useful when integrating cache transactions with some other in-house transactions. + * + * Method {@link #metrics()} to provide metrics for the whole cache. + * Method {@link #configuration()} to provide cache configuration bean. + * + * + * @param Cache key type. + * @param Cache value type. + */ +public interface GridCache extends CacheProjection { +/** + * Gets configuration bean for this cache. + * + * @return Configuration bean for this cache. + */ +public CacheConfiguration configuration(); + +/** + * Registers transactions synchronizations for all transactions started by this cache. + * Use it whenever you need to get notifications on transaction lifecycle and possibly change + * its course. It is also particularly useful when integrating cache transactions + * with some other in-house transactions. + * + * @param syncs Transaction synchronizations to register. + */ +public void txSynchronize(@Nullable IgniteTxSynchronization syncs); + +/** + * Removes transaction synchronizations. + * + * @param syncs Transactions synchronizations to remove. + * @see #txSynchronize(IgniteTxSynchronization) + */ +public void txUnsynchronize(@Nullable IgniteTxSynchronization syncs); + +/** + * Gets registered transaction synchronizations. + * + * @return Registered transaction synchronizations. + * @see #txSynchronize(IgniteTxSynchronization) + */ +public Collection txSynchronizations(); + +/** + * Gets affinity service to provide information about data partitioning + * and distribution. + * + * @return Cache data affinity service. + */ +public CacheAffinity affinity(); + +/** + * Gets data structures service to provide a gateway for creating various + * distributed data structures similar in
[03/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateReadOnlyAccessStrategy.java -- diff --git a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateReadOnlyAccessStrategy.java b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateReadOnlyAccessStrategy.java index 930bd7c..f778e4f 100644 --- a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateReadOnlyAccessStrategy.java +++ b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateReadOnlyAccessStrategy.java @@ -58,7 +58,7 @@ public class GridHibernateReadOnlyAccessStrategy extends GridHibernateAccessStra * @param ignite Grid. * @param cache Cache. */ -public GridHibernateReadOnlyAccessStrategy(Ignite ignite, GridCache cache) { +public GridHibernateReadOnlyAccessStrategy(Ignite ignite, Cache cache) { super(ignite, cache); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateReadWriteAccessStrategy.java -- diff --git a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateReadWriteAccessStrategy.java b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateReadWriteAccessStrategy.java index 848dac4..89f0a81 100644 --- a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateReadWriteAccessStrategy.java +++ b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateReadWriteAccessStrategy.java @@ -66,7 +66,7 @@ public class GridHibernateReadWriteAccessStrategy extends GridHibernateAccessStr * @param cache Cache. * @param txCtx Thread local instance used to track updates done during one Hibernate transaction. */ -protected GridHibernateReadWriteAccessStrategy(Ignite ignite, GridCache cache, ThreadLocal txCtx) { +protected GridHibernateReadWriteAccessStrategy(Ignite ignite, Cache cache, ThreadLocal txCtx) { super(ignite, cache); this.txCtx = (ThreadLocal)txCtx; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateRegion.java -- diff --git a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateRegion.java b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateRegion.java index b30799f..1038758 100644 --- a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateRegion.java +++ b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateRegion.java @@ -35,7 +35,7 @@ public class GridHibernateRegion implements Region { private final String name; /** Cache instance. */ -protected final GridCache cache; +protected final Cache cache; /** Grid instance. */ protected Ignite ignite; @@ -47,7 +47,7 @@ public class GridHibernateRegion implements Region { * @param cache Region cache. */ public GridHibernateRegion(GridHibernateRegionFactory factory, String name, Ignite ignite, -GridCache cache) { +Cache cache) { this.factory = factory; this.name = name; this.ignite = ignite; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateRegionFactory.java -- diff --git a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateRegionFactory.java b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateRegionFactory.java index 751785d..30a2a43 100644 --- a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateRegionFactory.java +++ b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateRegionFactory.java @@ -46,8 +46,8 @@ import static org.hibernate.cache.spi.access.AccessType.*; * * org.gridgain.hibernate.grid_name=* - * Each Hibernate cache region must be associated with some {@link org.apache.ignite.cache.GridCache}, by default it is assumed that - * for each cache region there is a {@link org.apache.ignite.cache.GridCache} with the same name. Also it is possible to define + * Each Hibernate cache region must be associated with some {@link org.apache.ignite.cache.Cache}, by default it is assumed that + * for each cache region there is a {@link org.apache.ignite.cache.Cache} with the same name. Also it is possible to def
[37/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/CacheWriteSynchronizationMode.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheWriteSynchronizationMode.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheWriteSynchronizationMode.java new file mode 100644 index 000..6c41374 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheWriteSynchronizationMode.java @@ -0,0 +1,69 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.cache; + +import org.apache.ignite.transactions.*; +import org.jetbrains.annotations.*; + +/** + * Mode indicating how GridGain should wait for write replies from other nodes. Default + * value is {@link #FULL_ASYNC}}, which means that GridGain will not wait for responses from + * participating nodes. This means that by default remote nodes may get their state updated slightly after + * any of the cache write methods complete, or after {@link IgniteTx#commit()} method completes. + * + * Note that regardless of write synchronization mode, cache data will always remain fully + * consistent across all participating nodes. + * + * Write synchronization mode may be configured via {@link org.apache.ignite.cache.CacheConfiguration#getWriteSynchronizationMode()} + * configuration property. + */ +public enum CacheWriteSynchronizationMode { +/** + * Flag indicating that GridGain should wait for write or commit replies from all nodes. + * This behavior guarantees that whenever any of the atomic or transactional writes + * complete, all other participating nodes which cache the written data have been updated. + */ +FULL_SYNC, + +/** + * Flag indicating that GridGain will not wait for write or commit responses from participating nodes, + * which means that remote nodes may get their state updated a bit after any of the cache write methods + * complete, or after {@link IgniteTx#commit()} method completes. + */ +FULL_ASYNC, + +/** + * This flag only makes sense for {@link CacheMode#PARTITIONED} mode. When enabled, GridGain + * will wait for write or commit to complete on {@code primary} node, but will not wait for + * backups to be updated. + */ +PRIMARY_SYNC; + +/** Enumerated values. */ +private static final CacheWriteSynchronizationMode[] VALS = values(); + +/** + * Efficiently gets enumerated value from its ordinal. + * + * @param ord Ordinal value. + * @return Enumerated value or {@code null} if ordinal out of range. + */ +@Nullable public static CacheWriteSynchronizationMode fromOrdinal(int ord) { +return ord >= 0 && ord < VALS.length ? VALS[ord] : null; +} +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java b/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java deleted file mode 100644 index 3a070d4..000 --- a/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.
[49/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java index 3ff7c94..1efc144 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java @@ -71,7 +71,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @param c Test closure. * @throws Exception In case of error. */ -private void runTest(final IgniteInClosure> c) throws Exception { +private void runTest(final IgniteInClosure> c) throws Exception { final IgniteFuture fut1 = GridTestUtils.runMultiThreadedAsync(new CAX() { @Override public void applyx() throws IgniteCheckedException { while (true) { @@ -92,7 +92,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid IgniteFuture fut2 = GridTestUtils.runMultiThreadedAsync(new CA() { @Override public void apply() { -Cache cache = cache(); +GridCache cache = cache(); while (!fut1.isDone()) if (guard.get()) @@ -151,8 +151,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsKey() throws Exception { -runTest(new CI1>() { -@Override public void apply(Cache cache) { +runTest(new CI1>() { +@Override public void apply(GridCache cache) { assert cache.containsKey("key" + random()); assert !cache.containsKey("wrongKey"); } @@ -163,8 +163,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsKeyFiltered() throws Exception { -runTest(new CI1>() { -@Override public void apply(Cache cache) { +runTest(new CI1>() { +@Override public void apply(GridCache cache) { assert cache.projection(F.cacheHasPeekValue()).containsKey("key"); assert !cache.projection(F.cacheNoPeekValue()).containsKey("key" + random()); } @@ -175,8 +175,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsValue() throws Exception { -runTest(new CI1>() { -@Override public void apply(Cache cache) { +runTest(new CI1>() { +@Override public void apply(GridCache cache) { assert cache.containsValue(random()); assert !cache.containsValue(-1); } @@ -187,8 +187,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testContainsValueFiltered() throws Exception { -runTest(new CI1>() { -@Override public void apply(Cache cache) { +runTest(new CI1>() { +@Override public void apply(GridCache cache) { assert cache.projection(F.cacheHasPeekValue()).containsValue(random()); assert !cache.projection(F.cacheNoPeekValue()).containsValue(random()); } @@ -199,8 +199,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testForAll() throws Exception { -runTest(new CI1>() { -@Override public void apply(Cache cache) { +runTest(new CI1>() { +@Override public void apply(GridCache cache) { assert cache.forAll(new P1>() { @Override public boolean apply(CacheEntry e) { Integer val = e.peek(); @@ -216,8 +216,8 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid * @throws Exception In case of error. */ public void testGet() throws Exception { -runTest(new CIX1>() { -@Override public void applyx(Cache cache) throws IgniteCheckedException { +runTest(new CIX1>() { +@Override public void applyx(GridCache cache) throws IgniteCheckedException { int rnd = random(); assert cache.get("key" + rnd) == r
[18/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java index d356c6e..89baa85 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.cache.affinity.*; -import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.testframework.junits.common.*; import java.util.*; @@ -31,16 +30,16 @@ public class GridCacheAffinityMapperSelfTest extends GridCommonAbstractTest { * */ public void testMethodAffinityMapper() { -GridCacheAffinityKeyMapper mapper = +CacheAffinityKeyMapper mapper = new GridCacheDefaultAffinityKeyMapper(); -List> keys = new ArrayList<>(); +List> keys = new ArrayList<>(); for (int i = 1; i <= 10; i++) -keys.add(new GridCacheAffinityKey<>(i, Integer.toString(i))); +keys.add(new CacheAffinityKey<>(i, Integer.toString(i))); for (int i = 1; i <= 10; i++) { -GridCacheAffinityKey key = keys.get(i - 1); +CacheAffinityKey key = keys.get(i - 1); Object mapped = mapper.affinityKey(key); @@ -55,7 +54,7 @@ public class GridCacheAffinityMapperSelfTest extends GridCommonAbstractTest { * */ public void testFieldAffinityMapper() { -GridCacheAffinityKeyMapper mapper = +CacheAffinityKeyMapper mapper = new GridCacheDefaultAffinityKeyMapper(); List> keys = new ArrayList<>(); @@ -79,7 +78,7 @@ public class GridCacheAffinityMapperSelfTest extends GridCommonAbstractTest { * */ public void testFieldAffinityMapperWithWrongClass() { -GridCacheAffinityKeyMapper mapper = +CacheAffinityKeyMapper mapper = new GridCacheDefaultAffinityKeyMapper(); FieldNoAffinityKey key = new FieldNoAffinityKey(); @@ -102,7 +101,7 @@ public class GridCacheAffinityMapperSelfTest extends GridCommonAbstractTest { private K key; /** Affinity key. */ -@GridCacheAffinityKeyMapped +@CacheAffinityKeyMapped private Object affKey; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java index a6b96e9..7e52b63 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java @@ -37,7 +37,7 @@ import org.apache.ignite.testframework.junits.common.*; import java.util.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Affinity routing tests. @@ -272,7 +272,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { */ private static class FieldAffinityJob implements IgniteCallable { /** Affinity key. */ -@GridCacheAffinityKeyMapped +@CacheAffinityKeyMapped @GridToStringInclude private Object affKey; @@ -305,7 +305,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { if (log.isDebugEnabled()) log.debug("Running job [node=" + ignite.cluster().localNode().id() + ", job=" + this + "]"); -GridCacheAffinity aff = ignite.cache(null).affinity(); +CacheAffinity aff = ignite.cache(null).affinity(); return F.eqNodes(ignite.cluster().localNode(), aff.mapKeyToNode(affKey)); } @@ -346,7 +346,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { /** * @return Affinity key. */ -@GridCacheAffinityKeyMapped +@CacheAffinityKeyMapped public Object affinityKey() { return affKey; } @@ -361,7 +3
[45/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java index e69d160..5d89685 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java @@ -74,8 +74,8 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti for (int i = 0; i < size; i++) putMap.put(i, i * i); -Cache prj0 = grid(0).cache(null); -Cache prj1 = grid(1).cache(null); +GridCache prj0 = grid(0).cache(null); +GridCache prj1 = grid(1).cache(null); prj0.putAll(putMap); @@ -101,8 +101,8 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti for (int i = 0; i < size; i++) putMap.put(i, i); -Cache prj0 = grid(0).cache(null); -Cache prj1 = grid(1).cache(null); +GridCache prj0 = grid(0).cache(null); +GridCache prj1 = grid(1).cache(null); prj0.putAll(putMap); @@ -135,7 +135,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti int size = 10; -Cache prj0 = grid(0).cache(null); +GridCache prj0 = grid(0).cache(null); for (int i = 0; i < size; i++) { info("Putting value [i=" + i + ']'); @@ -148,7 +148,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti for (int i = 0; i < gridCount(); i++) { assertEquals(0, context(i).tm().idMapSize()); -Cache cache = grid(i).cache(null); +GridCache cache = grid(i).cache(null); ClusterNode node = grid(i).localNode(); for (int k = 0; k < size; k++) { @@ -230,7 +230,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti Integer nearPeekVal = nearEnabled ? 1 : null; -Cache c = cache(i); +GridCache c = cache(i); CacheEntry e = c.entry("key"); @@ -267,7 +267,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti Integer nearPeekVal = nearEnabled ? 1 : null; -Cache c = cache(i); +GridCache c = cache(i); CacheEntry e = c.entry("key"); @@ -366,7 +366,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti info("Node: " + node); -Cache cache = G.ignite(node.id()).cache(null); +GridCache cache = G.ignite(node.id()).cache(null); checkLockAsyncWithTimeoutEntry("key", cache); } @@ -384,7 +384,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti info("Node: " + node); -Cache cache = G.ignite(node.id()).cache(null); +GridCache cache = G.ignite(node.id()).cache(null); checkLockAsyncWithTimeoutEntry("key", cache); } @@ -412,7 +412,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti info("Node: " + node); -Cache cache = G.ignite(node.id()).cache(null); +GridCache cache = G.ignite(node.id()).cache(null); checkLockAsyncWithTimeoutEntry("key", cache); } @@ -542,7 +542,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti info("All affinity nodes: " + affinityNodes()); -Cache cache = grid(0).cache(null); +GridCache cache = grid(0).cache(null); info("Cache affinity nodes: " + cache.affinity().mapKeyToPrimaryAndBackups(key)); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java index 9e1499e..36515f4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitioned
[39/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/CacheFlag.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheFlag.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheFlag.java new file mode 100644 index 000..ed74b7d --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheFlag.java @@ -0,0 +1,110 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.cache; + +import org.apache.ignite.*; +import org.apache.ignite.transactions.*; +import org.jetbrains.annotations.*; + +import javax.cache.processor.*; + +/** + * Cache projection flags that specify projection behaviour. This flags can be explicitly passed into + * the following methods on {@link CacheProjection}: + * + * {@link CacheProjection#flagsOn(CacheFlag...)} + * {@link CacheProjection#flagsOff(CacheFlag...)} + * + * Also, some flags, like {@link #LOCAL}, or {@link #READ} may be implicitly set whenever + * creating new projections and passing entries to predicate filters. + */ +public enum CacheFlag { +/** + * Only operations that don't require any communication with + * other cache nodes are allowed. This flag is automatically set + * on underlying projection for all the entries that are given to + * predicate filters to make sure that no distribution happens + * from inside of predicate evaluation. + */ +LOCAL, + +/** + * Only operations that don't change cached data are allowed. + * This flag is automatically set on underlying projection for + * all the entries that are given to predicate filters to make + * sure that data cannot be updated during predicate evaluation. + */ +READ, + +/** + * Clone values prior to returning them to user. + * + * Whenever values are returned from cache, they cannot be directly updated + * as cache holds the same references internally. If it is needed to + * update values that are returned from cache, this flag will provide + * automatic cloning of values prior to returning so they can be directly + * updated. + * + * @see CacheConfiguration#getCloner() + */ +CLONE, + +/** Skips store, i.e. no read-through and no write-through behavior. */ +SKIP_STORE, + +/** Skip swap space for reads and writes. */ +SKIP_SWAP, + +/** Synchronous commit. */ +SYNC_COMMIT, + +/** + * Switches a cache projection to work in {@code 'invalidation'} mode. + * Instead of updating remote entries with new values, small invalidation + * messages will be sent to set the values to {@code null}. + * + * @see IgniteTx#isInvalidate() + * @see CacheConfiguration#isInvalidate() + */ +INVALIDATE, + +/** + * Skips version check during {@link IgniteCache#invoke(Object, EntryProcessor, Object[])} writes in + * {@link CacheAtomicityMode#ATOMIC} mode. By default, in {@code ATOMIC} mode, whenever + * {@code transform(...)} is called, cache values (and not the {@code transform} closure) are sent from primary + * node to backup nodes to ensure proper update ordering. + * + * By setting this flag, version check is skipped, and the {@code transform} closure is applied on both, primary + * and backup nodes. Use this flag for better performance if you are sure that there are no + * concurrent updates happening for the same key when {@code transform(...)} method is called. + */ +FORCE_TRANSFORM_BACKUP; + +/** */ +private static final CacheFlag[] VALS = values(); + +/** + * Efficiently gets enumerated value from its ordinal. + * + * @param ord Ordinal value. + * @return Enumerated value or {@code null} if ordinal out of range. + */ +@Nullable public static CacheFlag fromOrdinal(int ord) { +return ord >= 0 && ord < VALS.length ? VALS[ord] : null; +} +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/CacheFlagException.java
[36/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/GridCacheProjection.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/GridCacheProjection.java b/modules/core/src/main/java/org/apache/ignite/cache/GridCacheProjection.java deleted file mode 100644 index d3a7517..000 --- a/modules/core/src/main/java/org/apache/ignite/cache/GridCacheProjection.java +++ /dev/null @@ -1,1912 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache; - -import org.apache.ignite.*; -import org.apache.ignite.cache.query.*; -import org.apache.ignite.cache.store.*; -import org.apache.ignite.cluster.*; -import org.apache.ignite.lang.*; -import org.apache.ignite.transactions.*; -import org.jetbrains.annotations.*; - -import java.sql.*; -import java.util.*; -import java.util.Date; -import java.util.concurrent.*; - -/** - * This interface provides a rich API for working with distributed caches. It includes the following - * main functionality: - * - * - * Various {@code 'get(..)'} methods to synchronously or asynchronously get values from cache. - * All {@code 'get(..)'} methods are transactional and will participate in an ongoing transaction - * if there is one. - * - * - * Various {@code 'put(..)'}, {@code 'putIfAbsent(..)'}, and {@code 'replace(..)'} methods to - * synchronously or asynchronously put single or multiple entries into cache. - * All these methods are transactional and will participate in an ongoing transaction - * if there is one. - * - * - * Various {@code 'remove(..)'} methods to synchronously or asynchronously remove single or multiple keys - * from cache. All {@code 'remove(..)'} methods are transactional and will participate in an ongoing transaction - * if there is one. - * - * - * Various {@code 'contains(..)'} method to check if cache contains certain keys or values locally. - * - * - * Various {@code 'forEach(..)'}, {@code 'forAny(..)'}, and {@code 'reduce(..)'} methods to visit - * every local cache entry within this projection. - * - * - * Various {@code flagsOn(..)'}, {@code 'flagsOff(..)'}, and {@code 'projection(..)'} methods to - * set specific flags and filters on a cache projection. - * - * - * Methods like {@code 'keySet(..)'}, {@code 'values(..)'}, and {@code 'entrySet(..)'} to provide - * views on cache keys, values, and entries. - * - * - * Various {@code 'peek(..)'} methods to peek at values in global or transactional memory, swap - * storage, or persistent storage. - * - * - * Various {@code 'reload(..)'} methods to reload latest values from persistent storage. - * - * - * Various {@code 'promote(..)'} methods to load specified keys from swap storage into - * global cache memory. - * - * - * Various {@code 'lock(..)'}, {@code 'unlock(..)'}, and {@code 'isLocked(..)'} methods to acquire, release, - * and check on distributed locks on a single or multiple keys in cache. All locking methods - * are not transactional and will not enlist keys into ongoing transaction, if any. - * - * - * Various {@code 'clear(..)'} methods to clear elements from cache, and optionally from - * swap storage. All {@code 'clear(..)'} methods are not transactional and will not enlist cleared - * keys into ongoing transaction, if any. - * - * - * Various {@code 'evict(..)'} methods to evict elements from cache, and optionally store - * them in underlying swap storage for later access. All {@code 'evict(..)'} methods are not - * transactional and will not enlist evicted keys into ongoing transaction, if any. - * - * - * Various {@code 'txStart(..)'} methods to perform various cache - * operations within a transaction (see {@link IgniteTx} for more information). - * - * - * {@link #queries()} method to get an instance of {@link org.apache.ignite.cache.query.GridCacheQueries} service for working - * with distributed cache queries. - * - * - * Various {@code 'gridProjection(..)'} methods which provide {@link org.apache.ignite.cluster.ClusterGroup} only - * for nodes on which given k
[42/55] [abbrv] incubator-ignite git commit: # ignite-63
# ignite-63 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/cafee25f Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/cafee25f Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/cafee25f Branch: refs/heads/ignite-65 Commit: cafee25f9ff86e0578520d2ce761bd4c68af94dc Parents: a4065d1 Author: sboikov Authored: Fri Jan 23 15:22:34 2015 +0300 Committer: sboikov Committed: Fri Jan 23 15:23:56 2015 +0300 -- examples/config/example-cache.xml |2 +- .../examples/datagrid/CacheAffinityExample.java |6 +- .../examples/datagrid/CacheApiExample.java | 20 +- .../datagrid/CacheContinuousQueryExample.java | 14 +- .../datagrid/CacheDataLoaderExample.java|2 +- .../examples/datagrid/CacheEventsExample.java |2 +- .../datagrid/CachePopularNumbersExample.java|4 +- .../examples/datagrid/CachePutGetExample.java |4 +- .../examples/datagrid/CacheQueryExample.java| 72 +- .../datagrid/CacheTransactionExample.java |6 +- .../datastructures/CacheAtomicLongExample.java |2 +- .../CacheAtomicReferenceExample.java|4 +- .../CacheAtomicSequenceExample.java |4 +- .../CacheAtomicStampedExample.java |4 +- .../CacheCountDownLatchExample.java |4 +- .../datastructures/CacheQueueExample.java |8 +- .../datastructures/CacheSetExample.java |8 +- .../HibernateL2CacheExampleNodeStartup.java |2 +- .../starschema/CacheStarSchemaExample.java | 22 +- .../datagrid/starschema/DimProduct.java |4 +- .../examples/datagrid/starschema/DimStore.java |4 +- .../datagrid/starschema/FactPurchase.java |8 +- .../datagrid/store/CacheStoreExample.java |2 +- .../store/CacheStoreLoadDataExample.java|4 +- .../store/dummy/CacheDummyPersonStore.java |7 +- .../client/memcache/MemcacheRestExample.java|4 +- .../MemcacheRestExampleNodeStartup.java |6 +- .../examples/ScalarCacheAffinityExample1.scala | 10 +- .../ScalarCacheAffinitySimpleExample.scala |4 +- .../scalar/examples/ScalarCacheExample.scala|4 +- .../examples/ScalarCacheQueryExample.scala | 16 +- .../examples/ScalarSnowflakeSchemaExample.scala |8 +- .../ClientAbstractMultiThreadedSelfTest.java|6 +- .../ignite/client/ClientPutPortableTask.java|2 +- .../client/ClientTopologyCacheSelfTest.java |2 +- .../client/impl/ClientCacheFlagsCodecTest.java |8 +- .../impl/ClientPartitionAffinitySelfTest.java | 10 +- .../ClientAbstractMultiNodeSelfTest.java|6 +- .../integration/ClientAbstractSelfTest.java | 20 +- .../rest/AbstractRestProcessorSelfTest.java |2 +- .../rest/RestBinaryProtocolSelfTest.java|2 +- .../rest/RestMemcacheProtocolSelfTest.java |2 +- .../processors/rest/RestProcessorTest.java |2 +- .../rest/TaskCommandHandlerSelfTest.java|2 +- .../ignite/jdbc/JdbcComplexQuerySelfTest.java | 26 +- .../ignite/jdbc/JdbcEmptyCacheSelfTest.java |2 +- .../ignite/jdbc/JdbcLocalCachesSelfTest.java|8 +- .../ignite/jdbc/JdbcMetadataSelfTest.java | 22 +- .../jdbc/JdbcPreparedStatementSelfTest.java | 34 +- .../ignite/jdbc/JdbcResultSetSelfTest.java | 40 +- .../ignite/jdbc/JdbcStatementSelfTest.java | 12 +- .../clients/src/test/resources/spring-cache.xml |2 +- .../src/test/resources/spring-server-node.xml | 10 +- .../test/resources/spring-server-ssl-node.xml | 10 +- .../src/main/java/org/apache/ignite/Ignite.java |6 +- .../apache/ignite/IgniteBasicWarmupClosure.java | 30 +- .../java/org/apache/ignite/IgniteCache.java | 32 +- .../java/org/apache/ignite/IgniteCluster.java |4 +- .../org/apache/ignite/IgniteDataLoader.java |2 +- .../java/org/apache/ignite/IgnitePortables.java | 14 +- .../java/org/apache/ignite/cache/Cache.java | 278 +++ .../ignite/cache/CacheAtomicWriteOrderMode.java |8 +- .../apache/ignite/cache/CacheConfiguration.java | 126 +- .../ignite/cache/CacheDistributionMode.java | 69 + .../org/apache/ignite/cache/CacheEntry.java | 621 ++ .../apache/ignite/cache/CacheEntryEvent.java|4 +- .../java/org/apache/ignite/cache/CacheFlag.java | 110 + .../apache/ignite/cache/CacheFlagException.java | 67 + .../apache/ignite/cache/CacheInterceptor.java | 120 ++ .../ignite/cache/CacheInterceptorAdapter.java | 52 + .../org/apache/ignite/cache/CacheMBean.java | 295 +++ .../apache/ignite/cache/CacheMemoryMode.java| 59 + .../org/apache/ignite/cache/CacheMetrics.java | 103 + .../java/org/apache/ignite/cache/CacheMode.java |4 +- .../java/org/apache/ignite/c
[21/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsDataManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsDataManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsDataManager.java index f912f47..ce7b3fc 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsDataManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsDataManager.java @@ -68,7 +68,7 @@ public class GridGgfsDataManager extends GridGgfsManager { private GridCacheProjectionEx dataCachePrj; /** Data cache. */ -private GridCache dataCache; +private Cache dataCache; /** */ private IgniteFuture dataCacheStartFut; @@ -163,7 +163,7 @@ public class GridGgfsDataManager extends GridGgfsManager { assert dataCachePrj != null; -GridCacheAffinityKeyMapper mapper = ggfsCtx.kernalContext().cache() +CacheAffinityKeyMapper mapper = ggfsCtx.kernalContext().cache() .internalCache(ggfsCtx.configuration().getDataCacheName()).configuration().getAffinityMapper(); grpSize = mapper instanceof IgniteFsGroupDataBlocksKeyMapper ? @@ -391,7 +391,7 @@ public class GridGgfsDataManager extends GridGgfsManager { final GridGgfsBlockKey key = blockKey(blockIdx, fileInfo); if (log.isDebugEnabled()) { -GridCacheEntry entry = dataCachePrj.entry(key); +CacheEntry entry = dataCachePrj.entry(key); assert entry != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsImpl.java index f70ff32..4fb77bc 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsImpl.java @@ -115,7 +115,7 @@ public final class GridGgfsImpl implements GridGgfsEx { private Object topic; /** Eviction policy (if set). */ -private GridCacheGgfsPerBlockLruEvictionPolicy evictPlc; +private CacheGgfsPerBlockLruEvictionPolicy evictPlc; /** * Creates GGFS instance with given context. @@ -197,10 +197,10 @@ public final class GridGgfsImpl implements GridGgfsEx { for (CacheConfiguration cacheCfg : ggfsCtx.kernalContext().config().getCacheConfiguration()) { if (F.eq(dataCacheName, cacheCfg.getName())) { -GridCacheEvictionPolicy evictPlc = cacheCfg.getEvictionPolicy(); +CacheEvictionPolicy evictPlc = cacheCfg.getEvictionPolicy(); -if (evictPlc != null & evictPlc instanceof GridCacheGgfsPerBlockLruEvictionPolicy) -this.evictPlc = (GridCacheGgfsPerBlockLruEvictionPolicy)evictPlc; +if (evictPlc != null & evictPlc instanceof CacheGgfsPerBlockLruEvictionPolicy) +this.evictPlc = (CacheGgfsPerBlockLruEvictionPolicy)evictPlc; break; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsMetaManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsMetaManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsMetaManager.java index ffcefd8..868eb95 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsMetaManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsMetaManager.java @@ -52,7 +52,7 @@ public class GridGgfsMetaManager extends GridGgfsManager { private IgniteFsConfiguration cfg; /** Metadata cache. */ -private GridCache metaCache; +private Cache metaCache; /** */ private IgniteFuture metaCacheStartFut; @@ -2540,7 +2540,7 @@ public class GridGgfsMetaManager extends GridGgfsManager { * @return {@code True} if value was stored in cache, {@code false} otherwise. * @throws IgniteCheckedException If operation failed. */ -private boolean putx(GridCacheProjection cache, K key, IgniteClosure c) throws IgniteCheckedException { +private boolean putx(CacheProjection cache, K key, IgniteClosure c) throws IgniteCheckedException { assert validTxState(true); V oldVal = cache.get(key); http://git-w
[43/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java index a5fc80b..7c79018 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java @@ -192,8 +192,8 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @return Cache to use in tests. * @throws Exception If failed. */ -private Cache populate() throws Exception { -Cache cache = grid(0).cache(null); +private GridCache populate() throws Exception { +GridCache cache = grid(0).cache(null); assertEquals(0, cache.size()); assertEquals(0, cache.offHeapEntriesCount()); @@ -343,7 +343,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testIterators() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); int cnt = 0; @@ -381,7 +381,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testSql() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); Collection> res = cache.queries(). createSqlQuery(Long.class, "_val >= ? and _val < ?"). @@ -412,7 +412,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testUnswap() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); for (long i = from; i < to; i++) { Long val = cache.promote(i); @@ -438,7 +438,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testUnswapAll() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); Collection keys = new HashSet<>(); @@ -461,7 +461,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testGet() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); for (long i = from; i < to; i++) { Long val = cache.get(i); @@ -485,7 +485,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testPeek() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); for (long i = from; i < to; i++) { assertNull(cache.peek(i)); @@ -510,7 +510,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testIteratorsCleanup() throws Exception { -final Cache cache = populate(); +final GridCache cache = populate(); IgniteFuture offHeapFut = multithreadedAsync(new Runnable() { @Override public void run() { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java index 0545b7c..7c93844 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java @@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.*; import org.apache.ignite.cache.*; -import org.apache.ignite.cache.Cache; +import org.apache.ignite.cache.GridCache; import org.apache.ignite.cache.query.*; import org.apache.ignite.cache.store.*; import org.apache.ignite.configuration.*; @@ -112,7 +112,7 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testLoadCache() throws Exception { -Cache cache = cache(
[13/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSequenceApiSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSequenceApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSequenceApiSelfTest.java index 6f4cd19..792a896 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSequenceApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSequenceApiSelfTest.java @@ -22,7 +22,7 @@ import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.datastructures.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Cache sequence basic tests. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceApiSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceApiSelfTest.java index 9ca5199..c502179 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceApiSelfTest.java @@ -22,8 +22,8 @@ import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.datastructures.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * AtomicReference basic tests. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceMultiNodeTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceMultiNodeTest.java index 32504df..7d268b0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceMultiNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicReferenceMultiNodeTest.java @@ -22,7 +22,7 @@ import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.datastructures.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * AtomicReference and AtomicStamped multi node tests. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java index 65e9c13..7810c6f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMulti
[20/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java index 6a28a73..70216b2 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java @@ -58,7 +58,7 @@ public class VisorCacheCompactTask extends VisorOneNodeTask, Map> run(Set names) throws IgniteCheckedException { final Map> res = new HashMap<>(); -for(GridCache cache : g.cachesx()) { +for(Cache cache : g.cachesx()) { String cacheName = cache.name(); if (names.contains(cacheName)) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java index 3071178..3e3fd08 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java @@ -40,7 +40,7 @@ public class VisorCacheConfiguration implements Serializable { private CacheMode mode; /** Distribution mode. */ -private GridCacheDistributionMode distributionMode; +private CacheDistributionMode distributionMode; /** Cache atomicity mode */ private CacheAtomicityMode atomicityMode; @@ -55,7 +55,7 @@ public class VisorCacheConfiguration implements Serializable { private boolean eagerTtl; /** Write synchronization mode. */ -private GridCacheWriteSynchronizationMode writeSynchronizationMode; +private CacheWriteSynchronizationMode writeSynchronizationMode; /** Sequence reserve size. */ private int seqReserveSize; @@ -100,7 +100,7 @@ public class VisorCacheConfiguration implements Serializable { private int pessimisticTxLogLinger; /** Memory mode. */ -private GridCacheMemoryMode memoryMode; +private CacheMemoryMode memoryMode; /** Name of SPI to use for indexing. */ private String indexingSpiName; @@ -225,14 +225,14 @@ public class VisorCacheConfiguration implements Serializable { /** * @return Distribution mode. */ -public GridCacheDistributionMode distributionMode() { +public CacheDistributionMode distributionMode() { return distributionMode; } /** * @param distributionMode New distribution mode. */ -public void distributionMode(GridCacheDistributionMode distributionMode) { +public void distributionMode(CacheDistributionMode distributionMode) { this.distributionMode = distributionMode; } @@ -295,14 +295,14 @@ public class VisorCacheConfiguration implements Serializable { /** * @return Write synchronization mode. */ -public GridCacheWriteSynchronizationMode writeSynchronizationMode() { +public CacheWriteSynchronizationMode writeSynchronizationMode() { return writeSynchronizationMode; } /** * @param writeSynchronizationMode New write synchronization mode. */ -public void writeSynchronizationMode(GridCacheWriteSynchronizationMode writeSynchronizationMode) { +public void writeSynchronizationMode(CacheWriteSynchronizationMode writeSynchronizationMode) { this.writeSynchronizationMode = writeSynchronizationMode; } @@ -506,14 +506,14 @@ public class VisorCacheConfiguration implements Serializable { /** * @return Memory mode. */ -public GridCacheMemoryMode memoryMode() { +public CacheMemoryMode memoryMode() { return memoryMode; } /** * @param memoryMode New memory mode. */ -public void memoryMode(GridCacheMemoryMode memoryMode) { +public void memoryMode(CacheMemoryMode memoryMode) { this.memoryMode = memoryMode; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfiguration.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfigu
incubator-ignite git commit: # sprint-1 Move classes to internal package
Repository: incubator-ignite Updated Branches: refs/heads/sprint-1 70678bee2 -> 15cbff49b # sprint-1 Move classes to internal package Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/15cbff49 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/15cbff49 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/15cbff49 Branch: refs/heads/sprint-1 Commit: 15cbff49be0299f5992287f9a07e5f496c72ead3 Parents: 70678be Author: sboikov Authored: Fri Jan 23 17:35:52 2015 +0300 Committer: sboikov Committed: Fri Jan 23 17:35:52 2015 +0300 -- .../datagrid/CacheTransactionExample.java | 2 +- .../examples/ScalarCacheQueryExample.scala | 3 +- .../client/impl/ClientCacheFlagsCodecTest.java | 2 +- .../java/org/apache/ignite/IgniteCache.java | 16 +-- .../apache/ignite/cache/CacheAtomicityMode.java | 2 +- .../apache/ignite/cache/CacheConfiguration.java | 8 +- .../org/apache/ignite/cache/CacheEntry.java | 12 +- .../java/org/apache/ignite/cache/CacheFlag.java | 110 --- .../apache/ignite/cache/CacheFlagException.java | 67 --- .../cache/CachePartialUpdateException.java | 6 +- .../apache/ignite/cache/CacheProjection.java| 1 + .../java/org/apache/ignite/cache/GridCache.java | 2 +- .../apache/ignite/cache/cloner/CacheCloner.java | 2 +- .../internal/processors/cache/CacheFlag.java| 110 +++ .../processors/cache/CacheFlagException.java| 67 +++ .../CachePartialUpdateCheckedException.java | 64 +++ .../processors/cache/GridCacheAdapter.java | 2 +- .../cache/GridCacheConcurrentMap.java | 2 +- .../processors/cache/GridCacheContext.java | 4 +- .../processors/cache/GridCacheMapEntry.java | 2 +- .../processors/cache/GridCacheMvccManager.java | 3 +- .../processors/cache/GridCacheProjectionEx.java | 24 ++-- .../cache/GridCacheSharedContext.java | 5 +- .../processors/cache/IgniteCacheProxy.java | 4 +- .../GridCacheDataStructuresManager.java | 4 +- .../dht/atomic/GridNearAtomicUpdateFuture.java | 12 +- .../dht/colocated/GridDhtColocatedCache.java| 2 +- .../distributed/near/GridNearAtomicCache.java | 2 +- .../distributed/near/GridNearCacheAdapter.java | 2 +- .../near/GridNearTransactionalCache.java| 2 +- .../local/atomic/GridLocalAtomicCache.java | 16 +-- .../GridCacheContinuousQueryEntry.java | 2 +- .../transactions/IgniteTransactionsImpl.java| 2 +- .../apache/ignite/transactions/IgniteTx.java| 2 +- .../GridCacheAbstractProjectionSelfTest.java| 4 +- .../GridCacheReturnValueTransferSelfTest.java | 2 +- .../cache/IgniteCacheInvokeAbstractTest.java| 2 +- .../GridCacheAbstractJobExecutionTest.java | 2 +- ...eAtomicInvalidPartitionHandlingSelfTest.java | 2 +- ...GridCacheValueConsistencyAtomicSelfTest.java | 2 +- .../near/GridCacheNearTxMultiNodeSelfTest.java | 1 + .../GridCachePartitionedProjectionSelfTest.java | 2 +- .../GridCacheReplicatedProjectionSelfTest.java | 2 +- ...ridCacheContinuousQueryAbstractSelfTest.java | 3 +- .../p2p/GridAbstractMultinodeRedeployTest.java | 2 +- 45 files changed, 329 insertions(+), 261 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15cbff49/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheTransactionExample.java -- diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheTransactionExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheTransactionExample.java index b5b43e3..db61b22 100644 --- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheTransactionExample.java +++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheTransactionExample.java @@ -23,7 +23,7 @@ import org.apache.ignite.transactions.*; import java.io.*; -import static org.apache.ignite.cache.CacheFlag.*; +import static org.apache.ignite.internal.processors.cache.CacheFlag.*; import static org.apache.ignite.transactions.IgniteTxConcurrency.*; import static org.apache.ignite.transactions.IgniteTxIsolation.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15cbff49/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala -- diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala index cda85d9..7a53588 100644 --- a/examples/src/main/sca
[46/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java index 9264c43..2f02c19 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java @@ -96,7 +96,7 @@ public class GridCacheDhtPreloadMessageCountTest extends GridCommonAbstractTest int cnt = KEY_CNT; -Cache c0 = g0.cache(null); +GridCache c0 = g0.cache(null); for (int i = 0; i < cnt; i++) c0.put(Integer.toString(i), i); @@ -106,8 +106,8 @@ public class GridCacheDhtPreloadMessageCountTest extends GridCommonAbstractTest U.sleep(1000); -Cache c1 = g1.cache(null); -Cache c2 = g2.cache(null); +GridCache c1 = g1.cache(null); +GridCache c2 = g2.cache(null); TestCommunicationSpi spi0 = (TestCommunicationSpi)g0.configuration().getCommunicationSpi(); TestCommunicationSpi spi1 = (TestCommunicationSpi)g1.configuration().getCommunicationSpi(); @@ -126,7 +126,7 @@ public class GridCacheDhtPreloadMessageCountTest extends GridCommonAbstractTest * @param c Cache. * @param keyCnt Key count. */ -private void checkCache(Cache c, int keyCnt) { +private void checkCache(GridCache c, int keyCnt) { Ignite g = c.gridProjection().ignite(); for (int i = 0; i < keyCnt; i++) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java index 24b63df..9a0224f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java @@ -194,7 +194,7 @@ public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest { for (int i = 0; i < ITER_CNT; i++) { info("Iteration # " + i); -Cache cache = g2.cache(null); +GridCache cache = g2.cache(null); for (int j = 0; j < KEY_CNT; j++) { CacheEntry entry = cache.entry(j); @@ -229,7 +229,7 @@ public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest { Ignite g1 = startGrid(1); -Cache cache = g1.cache(null); +GridCache cache = g1.cache(null); for (int j = 0; j < KEY_CNT; j++) { cache.put(j, j); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java index e04983d..d13f647 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java @@ -145,7 +145,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { * @return Affinity. */ @SuppressWarnings({"unchecked"}) -private CacheAffinity affinity(Cache cache) { +private CacheAffinity affinity(GridCache cache) { return cache.affinity(); } @@ -153,7 +153,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { * @param c Cache. * @return {@code True} if synchronous preloading. */ -priva
[44/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/lang/GridFuncSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridFuncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridFuncSelfTest.java index ebbf30f..fe3f031 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridFuncSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridFuncSelfTest.java @@ -2719,7 +2719,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest { Ignite g = startGrid(1); try { -Cache cache = g.cache(null); +GridCache cache = g.cache(null); cache.put("k1", "v1"); cache.put("k2", "v2"); @@ -2741,7 +2741,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest { Ignite g = startGrid(1); try { -Cache cache = g.cache(null); +GridCache cache = g.cache(null); cache.put("k1", "v1"); @@ -2778,7 +2778,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest { Ignite g = startGrid(1); try { -Cache cache = g.cache(null); +GridCache cache = g.cache(null); cache.put("k1", "v1"); cache.put("k2", "v2"); @@ -2809,7 +2809,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest { Ignite g = startGrid(1); try { -Cache cache = g.cache(null); +GridCache cache = g.cache(null); cache.put("k1", "v1"); cache.put("k2", "v2"); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java index 037f50e..f6b5904 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java @@ -131,7 +131,7 @@ abstract class GridCacheAbstractLoadTest { Ignite ignite = G.ignite(); -final Cache cache = ignite.cache(null); +final GridCache cache = ignite.cache(null); assert cache != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAffinityTransactionsOffHeapTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAffinityTransactionsOffHeapTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAffinityTransactionsOffHeapTest.java index efe0eb3..5b4f6a0 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAffinityTransactionsOffHeapTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAffinityTransactionsOffHeapTest.java @@ -59,7 +59,7 @@ public class GridCacheAffinityTransactionsOffHeapTest { startNodes(); for (int i = 0; i < KEY_CNT; i++) { -Cache c = cache(i); +GridCache c = cache(i); c.putx((long)i, 0); c.putx(new UserKey(i, 0), 0); @@ -71,7 +71,7 @@ public class GridCacheAffinityTransactionsOffHeapTest { long key = 5; -Cache c = cache(key); +GridCache c = cache(key); try (IgniteTx tx = c.txStartAffinity(key, PESSIMISTIC, REPEATABLE_READ, 0, 0)) { Integer val = c.get(key); @@ -153,7 +153,7 @@ public class GridCacheAffinityTransactionsOffHeapTest { * @param key Key. * @return Cache. */ -private static Cache cache(long key) { +private static GridCache cache(long key) { UUID id = Ignition.ignite("grid-0").cache(null).affinity().mapKeyToNode(key).id(); return Ignition.ignite(id).cache(null); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java index 9598902..b781f59 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java @@ -72,7 +72,7 @@ public class GridCacheBench
[09/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java index c3dd105..eeb1ff3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java @@ -34,10 +34,10 @@ import java.util.*; import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Checks that readers are properly handled. @@ -139,8 +139,8 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { Ignite g1 = grid(n1.id()); Ignite g2 = grid(n2.id()); -GridCache cache1 = g1.cache(null); -GridCache cache2 = g2.cache(null); +Cache cache1 = g1.cache(null); +Cache cache2 = g2.cache(null); // Store some values in cache. assertNull(cache1.put(1, "v1")); @@ -217,8 +217,8 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { ((GridKernal)g1).internalCache(null).preloader().request(F.asList(1, 2), 2).get(); ((GridKernal)g2).internalCache(null).preloader().request(F.asList(1, 2), 2).get(); -GridCache cache1 = g1.cache(null); -GridCache cache2 = g2.cache(null); +Cache cache1 = g1.cache(null); +Cache cache2 = g2.cache(null); assertEquals(cache1.affinity().mapKeyToNode(1), g1.cluster().localNode()); assertFalse(cache1.affinity().mapKeyToNode(2).equals(g1.cluster().localNode())); @@ -296,8 +296,8 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { startGrids(); try { -GridCache prj0 = grid(0).cache(null); -GridCache prj1 = grid(1).cache(null); +Cache prj0 = grid(0).cache(null); +Cache prj1 = grid(1).cache(null); Map putMap = new HashMap<>(); @@ -332,9 +332,9 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { startGrids(); try { -GridCache prj0 = grid(0).cache(null); -GridCache prj1 = grid(1).cache(null); -GridCache prj2 = grid(2).cache(null); +Cache prj0 = grid(0).cache(null); +Cache prj1 = grid(1).cache(null); +Cache prj2 = grid(2).cache(null); Map putMap = new HashMap<>(); @@ -390,8 +390,8 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { assertFalse("Nodes cannot be equal: " + primary, primary.equals(backup)); -GridCache cache1 = grid(primary.id()).cache(null); -GridCache cache2 = grid(backup.id()).cache(null); +Cache cache1 = grid(primary.id()).cache(null); +Cache cache2 = grid(backup.id()).cache(null); // Store a values in cache. assertNull(cache1.put(1, "v1")); @@ -431,7 +431,7 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { assertEquals(grid(1).localNode(), F.first(aff.nodes(aff.partition(key2), grid(1).nodes(; -GridCache cache = cache(0); +Cache cache = cache(0); assertNull(cache.put(key1, val1)); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearRemoveFailureTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearRemoveFailureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearRemoveFailureTest.java index e7ce57f..8ffaf71 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearRemoveFailureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearRemoveFailur
[24/55] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheCountDownLatchImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheCountDownLatchImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheCountDownLatchImpl.java index 00cc7cd..7ee45bf 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheCountDownLatchImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheCountDownLatchImpl.java @@ -61,7 +61,7 @@ public final class GridCacheCountDownLatchImpl implements GridCacheCountDownLatc private GridCacheInternalKey key; /** Latch projection. */ -private GridCacheProjection latchView; +private CacheProjection latchView; /** Cache context. */ private GridCacheContext ctx; @@ -103,7 +103,7 @@ public final class GridCacheCountDownLatchImpl implements GridCacheCountDownLatc * @param ctx Cache context. */ public GridCacheCountDownLatchImpl(String name, int cnt, int initCnt, boolean autoDel, GridCacheInternalKey key, -GridCacheProjection latchView, GridCacheContext ctx) { +CacheProjection latchView, GridCacheContext ctx) { assert name != null; assert cnt >= 0; assert initCnt >= 0; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheDataStructuresImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheDataStructuresImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheDataStructuresImpl.java index be9df8b..9008aca 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheDataStructuresImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheDataStructuresImpl.java @@ -25,7 +25,7 @@ import org.jetbrains.annotations.*; /** * Data structures implementation object. */ -public class GridCacheDataStructuresImpl implements GridCacheDataStructures { +public class GridCacheDataStructuresImpl implements CacheDataStructures { /** Data structures manager. */ private GridCacheDataStructuresManager dsMgr; @@ -37,7 +37,7 @@ public class GridCacheDataStructuresImpl implements GridCacheDataStructure } /** {@inheritDoc} */ -@Override public GridCacheAtomicSequence atomicSequence(String name, long initVal, boolean create) +@Override public CacheAtomicSequence atomicSequence(String name, long initVal, boolean create) throws IgniteCheckedException { return dsMgr.sequence(name, initVal, create); } @@ -48,7 +48,7 @@ public class GridCacheDataStructuresImpl implements GridCacheDataStructure } /** {@inheritDoc} */ -@Override public GridCacheAtomicLong atomicLong(String name, long initVal, boolean create) throws IgniteCheckedException { +@Override public CacheAtomicLong atomicLong(String name, long initVal, boolean create) throws IgniteCheckedException { return dsMgr.atomicLong(name, initVal, create); } @@ -58,7 +58,7 @@ public class GridCacheDataStructuresImpl implements GridCacheDataStructure } /** {@inheritDoc} */ -@Override public GridCacheAtomicReference atomicReference(String name, T initVal, boolean create) +@Override public CacheAtomicReference atomicReference(String name, T initVal, boolean create) throws IgniteCheckedException { return dsMgr.atomicReference(name, initVal, create); } @@ -69,7 +69,7 @@ public class GridCacheDataStructuresImpl implements GridCacheDataStructure } /** {@inheritDoc} */ -@Override public GridCacheAtomicStamped atomicStamped(String name, T initVal, S initStamp, +@Override public CacheAtomicStamped atomicStamped(String name, T initVal, S initStamp, boolean create) throws IgniteCheckedException { return dsMgr.atomicStamped(name, initVal, initStamp, create); } @@ -80,7 +80,7 @@ public class GridCacheDataStructuresImpl implements GridCacheDataStructure } /** {@inheritDoc} */ -@Override public GridCacheQueue queue(String name, int cap, boolean collocated, boolean create) +@Override public CacheQueue queue(String name, int cap, boolean collocated, boolean create) throws IgniteCheckedException { return dsMgr.queue(name, cap <= 0 ? Integer.MAX_VALUE : cap, collocated, create);
[54/55] [abbrv] incubator-ignite git commit: # sprint-1
# sprint-1 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/06efcbff Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/06efcbff Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/06efcbff Branch: refs/heads/ignite-65 Commit: 06efcbff8224cfbfc2e2e9b61b14e24c0586b5de Parents: 91d2b89 Author: sboikov Authored: Fri Jan 23 17:31:23 2015 +0400 Committer: sboikov Committed: Fri Jan 23 17:31:23 2015 +0400 -- .../examples/GridGgfsExamplesSelfTest.java | 67 .../examples/IgniteFsExamplesSelfTest.java | 67 .../testsuites/IgniteExamplesSelfTestSuite.java | 2 +- 3 files changed, 68 insertions(+), 68 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06efcbff/examples/src/test/java/org/apache/ignite/examples/GridGgfsExamplesSelfTest.java -- diff --git a/examples/src/test/java/org/apache/ignite/examples/GridGgfsExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/GridGgfsExamplesSelfTest.java deleted file mode 100644 index a39377c..000 --- a/examples/src/test/java/org/apache/ignite/examples/GridGgfsExamplesSelfTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.examples; - -import org.apache.ignite.configuration.*; -import org.apache.ignite.examples.ggfs.*; -import org.apache.ignite.internal.*; -import org.apache.ignite.internal.util.typedef.internal.*; -import org.apache.ignite.testframework.junits.common.*; - -/** - * GGFS examples self test. - */ -public class GridGgfsExamplesSelfTest extends GridAbstractExamplesTest { -/** Grid name for light client example. */ -private static final String CLIENT_LIGHT_GRID_NAME = "client-light-grid"; - -/** GGFS config with shared memory IPC. */ -private static final String GGFS_SHMEM_CFG = "modules/core/src/test/config/ggfs-shmem.xml"; - -/** GGFS config with loopback IPC. */ -private static final String GGFS_LOOPBACK_CFG = "modules/core/src/test/config/ggfs-loopback.xml"; - -/** GGFS no endpoint config. */ -private static final String GGFS_NO_ENDPOINT_CFG = "modules/core/src/test/config/ggfs-no-endpoint.xml"; - -/** {@inheritDoc} */ -@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { -String cfgPath = gridName == null ? (U.isWindows() ? GGFS_LOOPBACK_CFG : GGFS_SHMEM_CFG) : -GGFS_NO_ENDPOINT_CFG; - -IgniteConfiguration cfg = GridGainEx.loadConfiguration(cfgPath).get1(); - -cfg.setGridName(gridName); - -return cfg; -} - -/** - * @throws Exception If failed. - */ -public void testGgfsApiExample() throws Exception { -startGrids(3); - -try { -GgfsExample.main(EMPTY_ARGS); -} -finally { -stopAllGrids(); -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06efcbff/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java -- diff --git a/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java new file mode 100644 index 000..303de6d --- /dev/null +++ b/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java @@ -0,0 +1,67 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apac
[43/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java index a5fc80b..7c79018 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java @@ -192,8 +192,8 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @return Cache to use in tests. * @throws Exception If failed. */ -private Cache populate() throws Exception { -Cache cache = grid(0).cache(null); +private GridCache populate() throws Exception { +GridCache cache = grid(0).cache(null); assertEquals(0, cache.size()); assertEquals(0, cache.offHeapEntriesCount()); @@ -343,7 +343,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testIterators() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); int cnt = 0; @@ -381,7 +381,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testSql() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); Collection> res = cache.queries(). createSqlQuery(Long.class, "_val >= ? and _val < ?"). @@ -412,7 +412,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testUnswap() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); for (long i = from; i < to; i++) { Long val = cache.promote(i); @@ -438,7 +438,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testUnswapAll() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); Collection keys = new HashSet<>(); @@ -461,7 +461,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testGet() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); for (long i = from; i < to; i++) { Long val = cache.get(i); @@ -485,7 +485,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testPeek() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); for (long i = from; i < to; i++) { assertNull(cache.peek(i)); @@ -510,7 +510,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testIteratorsCleanup() throws Exception { -final Cache cache = populate(); +final GridCache cache = populate(); IgniteFuture offHeapFut = multithreadedAsync(new Runnable() { @Override public void run() { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java index 0545b7c..7c93844 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java @@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.*; import org.apache.ignite.cache.*; -import org.apache.ignite.cache.Cache; +import org.apache.ignite.cache.GridCache; import org.apache.ignite.cache.query.*; import org.apache.ignite.cache.store.*; import org.apache.ignite.configuration.*; @@ -112,7 +112,7 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testLoadCache() throws Exception { -Cache cache = cache(
[47/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheMultiNodeDataStructureTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheMultiNodeDataStructureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheMultiNodeDataStructureTest.java index 8c743f6..b739318 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheMultiNodeDataStructureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheMultiNodeDataStructureTest.java @@ -57,7 +57,7 @@ public class GridCacheMultiNodeDataStructureTest { * @throws IgniteCheckedException If failed. */ private static void sample(Ignite g, String cacheName) throws IgniteCheckedException { -Cache cache = g.cache(cacheName); +GridCache cache = g.cache(cacheName); CacheAtomicLong atomicLong = cache.dataStructures().atomicLong("keygen", 0, true); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java index 2b8b06e..a480880 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java @@ -278,7 +278,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon info("Queue name: " + queueName); -Cache c = grid(0).cache(null); +GridCache c = grid(0).cache(null); CacheQueue queue = c.dataStructures().queue(queueName, QUEUE_CAPACITY, false, true); @@ -372,7 +372,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon futs.add(GridTestUtils.runMultiThreadedAsync(new Callable() { @Override public Void call() throws Exception { -Cache cache = grid(idx).cache(null); +GridCache cache = grid(idx).cache(null); CacheQueue queue = cache.dataStructures().queue(queueName, 0, collocated, true); @@ -387,7 +387,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon for (IgniteFuture fut : futs) fut.get(); -Cache cache = grid(0).cache(null); +GridCache cache = grid(0).cache(null); CacheQueue queue = cache.dataStructures().queue(queueName, 0, collocated, true); @@ -443,7 +443,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon putFuts.add(GridTestUtils.runMultiThreadedAsync(new Callable() { @Override public Void call() throws Exception { -Cache cache = grid(idx).cache(null); +GridCache cache = grid(idx).cache(null); CacheQueue queue = cache.dataStructures().queue(queueName, 0, collocated, true); @@ -461,7 +461,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon pollFuts.add(GridTestUtils.runAsync(new Callable() { @Override public Void call() throws Exception { -Cache cache = grid(idx).cache(null); +GridCache cache = grid(idx).cache(null); CacheQueue queue = cache.dataStructures().queue(queueName, 0, collocated, true); @@ -487,7 +487,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon for (IgniteFuture fut : pollFuts) fut.get(); -Cache cache = grid(0).cache(null); +GridCache cache = grid(0).cache(null); CacheQueue queue = cache.dataStructures().queue(queueName, 0, collocated, true); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java -- diff --git
[05/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderPerformanceTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderPerformanceTest.java index 11bf0e3..25dee29 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderPerformanceTest.java @@ -31,8 +31,8 @@ import java.util.concurrent.*; import static org.apache.ignite.events.IgniteEventType.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** * Data loader performance test. Compares group lock data loader to traditional lock. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java index cddfd81..f652a65 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java @@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.dataload; import org.apache.ignite.*; import org.apache.ignite.cache.*; +import org.apache.ignite.cache.Cache; import org.apache.ignite.cache.eviction.fifo.*; import org.apache.ignite.cache.store.*; import org.apache.ignite.configuration.*; @@ -32,7 +33,6 @@ import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.testframework.junits.common.*; import org.jetbrains.annotations.*; -import javax.cache.*; import javax.cache.configuration.*; import java.util.*; import java.util.concurrent.*; @@ -40,9 +40,9 @@ import java.util.concurrent.atomic.*; import static java.util.concurrent.TimeUnit.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; import static org.apache.ignite.events.IgniteEventType.*; /** @@ -100,7 +100,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest { cc.setDistributionMode(nearEnabled ? NEAR_PARTITIONED : PARTITIONED_ONLY); cc.setWriteSynchronizationMode(FULL_SYNC); -cc.setEvictionPolicy(new GridCacheFifoEvictionPolicy(1)); +cc.setEvictionPolicy(new CacheFifoEvictionPolicy(1)); cc.setEvictSynchronized(false); cc.setEvictNearSynchronized(false); @@ -638,7 +638,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest { try { Ignite g = startGrid(); -final GridCache c = g.cache(null); +final Cache c = g.cache(null); final IgniteDataLoader ldr = g.dataLoader(null); @@ -690,7 +690,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest { try { Ignite g = startGrid(); -GridCache c = g.cache(null); +Cache c = g.cache(null); IgniteDataLoader ldr = g.dataLoader(null); @@ -735,7 +735,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest { } }, EVT_CACHE_OBJECT_PUT); -GridCache c = g.cache(null); +Cache c = g.cache(null); assertTrue(c.isEmpty()); @@ -871,7 +871,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ -@Override public void write(Cache.Entry entry) { +@Override public void write(javax.cache.Cache.Entry entry) { storeMap.put(entry.getKey(), entry.getValue()); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modu
[37/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/CacheWriteSynchronizationMode.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheWriteSynchronizationMode.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheWriteSynchronizationMode.java new file mode 100644 index 000..6c41374 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheWriteSynchronizationMode.java @@ -0,0 +1,69 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.cache; + +import org.apache.ignite.transactions.*; +import org.jetbrains.annotations.*; + +/** + * Mode indicating how GridGain should wait for write replies from other nodes. Default + * value is {@link #FULL_ASYNC}}, which means that GridGain will not wait for responses from + * participating nodes. This means that by default remote nodes may get their state updated slightly after + * any of the cache write methods complete, or after {@link IgniteTx#commit()} method completes. + * + * Note that regardless of write synchronization mode, cache data will always remain fully + * consistent across all participating nodes. + * + * Write synchronization mode may be configured via {@link org.apache.ignite.cache.CacheConfiguration#getWriteSynchronizationMode()} + * configuration property. + */ +public enum CacheWriteSynchronizationMode { +/** + * Flag indicating that GridGain should wait for write or commit replies from all nodes. + * This behavior guarantees that whenever any of the atomic or transactional writes + * complete, all other participating nodes which cache the written data have been updated. + */ +FULL_SYNC, + +/** + * Flag indicating that GridGain will not wait for write or commit responses from participating nodes, + * which means that remote nodes may get their state updated a bit after any of the cache write methods + * complete, or after {@link IgniteTx#commit()} method completes. + */ +FULL_ASYNC, + +/** + * This flag only makes sense for {@link CacheMode#PARTITIONED} mode. When enabled, GridGain + * will wait for write or commit to complete on {@code primary} node, but will not wait for + * backups to be updated. + */ +PRIMARY_SYNC; + +/** Enumerated values. */ +private static final CacheWriteSynchronizationMode[] VALS = values(); + +/** + * Efficiently gets enumerated value from its ordinal. + * + * @param ord Ordinal value. + * @return Enumerated value or {@code null} if ordinal out of range. + */ +@Nullable public static CacheWriteSynchronizationMode fromOrdinal(int ord) { +return ord >= 0 && ord < VALS.length ? VALS[ord] : null; +} +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java b/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java deleted file mode 100644 index 3a070d4..000 --- a/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * 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. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.
[06/56] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java index 93b97ca..39ce99d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java @@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration; import org.apache.ignite.cache.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; /** @@ -43,7 +43,7 @@ public class IgniteCacheTxLoaderWriterTest extends IgniteCacheLoaderWriterAbstra } /** {@inheritDoc} */ -@Override protected GridCacheDistributionMode distributionMode() { +@Override protected CacheDistributionMode distributionMode() { return PARTITIONED_ONLY; } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java index f4b02b1..c709386 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java @@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration; import org.apache.ignite.cache.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; /** @@ -43,7 +43,7 @@ public class IgniteCacheTxLocalLoadAllTest extends IgniteCacheLoadAllAbstractTes } /** {@inheritDoc} */ -@Override protected GridCacheDistributionMode distributionMode() { +@Override protected CacheDistributionMode distributionMode() { return PARTITIONED_ONLY; } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java index 519374c..65c36c9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java @@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration; import org.apache.ignite.cache.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; /** @@ -43,7 +43,7 @@ public class IgniteCacheTxLocalNoLoadPreviousValueTest extends IgniteCacheNoLoad } /** {@inheritDoc} */ -@Override protected GridCacheDistributionMode distributionMode() { +@Override protected CacheDistributionMode distributionMode() { return PARTITIONED_ONLY; } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/int
Git Push Summary
Repository: incubator-ignite Updated Branches: refs/heads/ignite-63 [deleted] 91d2b8986
Git Push Summary
Repository: incubator-ignite Updated Branches: refs/heads/ignite-42 [deleted] b9288ffec
[58/60] [abbrv] incubator-ignite git commit: # sprint-1
# sprint-1 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/70678bee Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/70678bee Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/70678bee Branch: refs/heads/ignite-99-2 Commit: 70678bee230271db2f2fae80ae710b791bbf8fd3 Parents: 1f1f0b6 Author: sboikov Authored: Fri Jan 23 17:24:09 2015 +0300 Committer: sboikov Committed: Fri Jan 23 17:24:09 2015 +0300 -- .../processors/job/GridJobProcessor.java| 3 -- .../processors/task/GridTaskWorker.java | 28 +-- .../internal/GridJobStealingSelfTest.java | 4 +- .../ignite/tests/p2p/ExcludeNodeFilter.java | 52 .../ignite/tests/p2p/GridExcludeNodeFilter.java | 52 5 files changed, 55 insertions(+), 84 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70678bee/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java index ece55f5..416d756 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java @@ -57,9 +57,6 @@ public class GridJobProcessor extends GridProcessorAdapter { /** */ private static final int FINISHED_JOBS_COUNT = Integer.getInteger(GG_JOBS_HISTORY_SIZE, 10240); -/** Version when subject ID was added. */ -public static final IgniteProductVersion SUBJECT_ID_ADDED_SINCE_VER = IgniteProductVersion.fromString("6.2.1"); - /** */ private final IgniteMarshaller marsh; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70678bee/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java index b032994..65a3250 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java @@ -1119,33 +1119,7 @@ class GridTaskWorker extends GridWorker implements GridTimeoutObject { boolean forceLocDep = internal || !ctx.deploy().enabled(); -req = node.version().compareTo(GridJobProcessor.SUBJECT_ID_ADDED_SINCE_VER) < 0 ? -new GridJobExecuteRequest( -ses.getId(), -res.getJobContext().getJobId(), -ses.getTaskName(), -ses.getUserVersion(), -ses.getTaskClassName(), -loc ? null : marsh.marshal(res.getJob()), -loc ? res.getJob() : null, -ses.getStartTime(), -timeout, -ses.getTopology(), -loc ? null : marsh.marshal(ses.getJobSiblings()), -loc ? ses.getJobSiblings() : null, -loc ? null : marsh.marshal(sesAttrs), -loc ? sesAttrs : null, -loc ? null: marsh.marshal(jobAttrs), -loc ? jobAttrs : null, -ses.getCheckpointSpi(), -dep.classLoaderId(), -dep.deployMode(), -continuous, -dep.participants(), -forceLocDep, -ses.isFullSupport(), -internal) : -new GridJobExecuteRequestV2( +req = new GridJobExecuteRequestV2( ses.getId(), res.getJobContext().getJobId(), ses.getTaskName(), http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70678bee/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java b/modules/core/src
[53/60] [abbrv] incubator-ignite git commit: # ignite-63
# ignite-63 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/91d2b898 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/91d2b898 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/91d2b898 Branch: refs/heads/ignite-99-2 Commit: 91d2b89863db37c40489bedc5b046bc5b7e93928 Parents: 50d64b0 Author: sboikov Authored: Fri Jan 23 16:16:06 2015 +0300 Committer: sboikov Committed: Fri Jan 23 16:16:06 2015 +0300 -- .../ignite/gridify/hierarchy/SuperTarget.java | 53 1 file changed, 53 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/91d2b898/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/SuperTarget.java -- diff --git a/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/SuperTarget.java b/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/SuperTarget.java new file mode 100644 index 000..c2ba1b0 --- /dev/null +++ b/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/SuperTarget.java @@ -0,0 +1,53 @@ +/* + * 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. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.gridify.hierarchy; + +import org.apache.ignite.compute.gridify.*; + +/** + * Target base class. + */ +public abstract class SuperTarget { +/** + * @return Always returns "SuperTarget.methodA()". + */ +@Gridify(gridName = "GridifyHierarchyTest") +protected String methodA() { +System.out.println(">>> Called SuperTarget.methodA()"); + +return "SuperTarget.methodA()"; +} + +/** + * @return "SuperTarget.methodC()" string. + */ +protected String methodB() { +return methodC(); +} + +/** + * @return "SuperTarget.methodC()" string. + */ +@Gridify(gridName = "GridifyHierarchyTest") +private String methodC() { +System.out.println(">>> Called SuperTarget.methodC()"); + +return "SuperTarget.methodC()"; +} + +}
[44/60] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/lang/GridFuncSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridFuncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridFuncSelfTest.java index ebbf30f..fe3f031 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridFuncSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridFuncSelfTest.java @@ -2719,7 +2719,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest { Ignite g = startGrid(1); try { -Cache cache = g.cache(null); +GridCache cache = g.cache(null); cache.put("k1", "v1"); cache.put("k2", "v2"); @@ -2741,7 +2741,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest { Ignite g = startGrid(1); try { -Cache cache = g.cache(null); +GridCache cache = g.cache(null); cache.put("k1", "v1"); @@ -2778,7 +2778,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest { Ignite g = startGrid(1); try { -Cache cache = g.cache(null); +GridCache cache = g.cache(null); cache.put("k1", "v1"); cache.put("k2", "v2"); @@ -2809,7 +2809,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest { Ignite g = startGrid(1); try { -Cache cache = g.cache(null); +GridCache cache = g.cache(null); cache.put("k1", "v1"); cache.put("k2", "v2"); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java index 037f50e..f6b5904 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java @@ -131,7 +131,7 @@ abstract class GridCacheAbstractLoadTest { Ignite ignite = G.ignite(); -final Cache cache = ignite.cache(null); +final GridCache cache = ignite.cache(null); assert cache != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAffinityTransactionsOffHeapTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAffinityTransactionsOffHeapTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAffinityTransactionsOffHeapTest.java index efe0eb3..5b4f6a0 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAffinityTransactionsOffHeapTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAffinityTransactionsOffHeapTest.java @@ -59,7 +59,7 @@ public class GridCacheAffinityTransactionsOffHeapTest { startNodes(); for (int i = 0; i < KEY_CNT; i++) { -Cache c = cache(i); +GridCache c = cache(i); c.putx((long)i, 0); c.putx(new UserKey(i, 0), 0); @@ -71,7 +71,7 @@ public class GridCacheAffinityTransactionsOffHeapTest { long key = 5; -Cache c = cache(key); +GridCache c = cache(key); try (IgniteTx tx = c.txStartAffinity(key, PESSIMISTIC, REPEATABLE_READ, 0, 0)) { Integer val = c.get(key); @@ -153,7 +153,7 @@ public class GridCacheAffinityTransactionsOffHeapTest { * @param key Key. * @return Cache. */ -private static Cache cache(long key) { +private static GridCache cache(long key) { UUID id = Ignition.ignite("grid-0").cache(null).affinity().mapKeyToNode(key).id(); return Ignition.ignite(id).cache(null); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java index 9598902..b781f59 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java @@ -72,7 +72,7 @@ public class GridCacheBench
[45/60] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java index e69d160..5d89685 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java @@ -74,8 +74,8 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti for (int i = 0; i < size; i++) putMap.put(i, i * i); -Cache prj0 = grid(0).cache(null); -Cache prj1 = grid(1).cache(null); +GridCache prj0 = grid(0).cache(null); +GridCache prj1 = grid(1).cache(null); prj0.putAll(putMap); @@ -101,8 +101,8 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti for (int i = 0; i < size; i++) putMap.put(i, i); -Cache prj0 = grid(0).cache(null); -Cache prj1 = grid(1).cache(null); +GridCache prj0 = grid(0).cache(null); +GridCache prj1 = grid(1).cache(null); prj0.putAll(putMap); @@ -135,7 +135,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti int size = 10; -Cache prj0 = grid(0).cache(null); +GridCache prj0 = grid(0).cache(null); for (int i = 0; i < size; i++) { info("Putting value [i=" + i + ']'); @@ -148,7 +148,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti for (int i = 0; i < gridCount(); i++) { assertEquals(0, context(i).tm().idMapSize()); -Cache cache = grid(i).cache(null); +GridCache cache = grid(i).cache(null); ClusterNode node = grid(i).localNode(); for (int k = 0; k < size; k++) { @@ -230,7 +230,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti Integer nearPeekVal = nearEnabled ? 1 : null; -Cache c = cache(i); +GridCache c = cache(i); CacheEntry e = c.entry("key"); @@ -267,7 +267,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti Integer nearPeekVal = nearEnabled ? 1 : null; -Cache c = cache(i); +GridCache c = cache(i); CacheEntry e = c.entry("key"); @@ -366,7 +366,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti info("Node: " + node); -Cache cache = G.ignite(node.id()).cache(null); +GridCache cache = G.ignite(node.id()).cache(null); checkLockAsyncWithTimeoutEntry("key", cache); } @@ -384,7 +384,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti info("Node: " + node); -Cache cache = G.ignite(node.id()).cache(null); +GridCache cache = G.ignite(node.id()).cache(null); checkLockAsyncWithTimeoutEntry("key", cache); } @@ -412,7 +412,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti info("Node: " + node); -Cache cache = G.ignite(node.id()).cache(null); +GridCache cache = G.ignite(node.id()).cache(null); checkLockAsyncWithTimeoutEntry("key", cache); } @@ -542,7 +542,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti info("All affinity nodes: " + affinityNodes()); -Cache cache = grid(0).cache(null); +GridCache cache = grid(0).cache(null); info("Cache affinity nodes: " + cache.affinity().mapKeyToPrimaryAndBackups(key)); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java index 9e1499e..36515f4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitioned
[06/60] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java index 93b97ca..39ce99d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java @@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration; import org.apache.ignite.cache.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; /** @@ -43,7 +43,7 @@ public class IgniteCacheTxLoaderWriterTest extends IgniteCacheLoaderWriterAbstra } /** {@inheritDoc} */ -@Override protected GridCacheDistributionMode distributionMode() { +@Override protected CacheDistributionMode distributionMode() { return PARTITIONED_ONLY; } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java index f4b02b1..c709386 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java @@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration; import org.apache.ignite.cache.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; /** @@ -43,7 +43,7 @@ public class IgniteCacheTxLocalLoadAllTest extends IgniteCacheLoadAllAbstractTes } /** {@inheritDoc} */ -@Override protected GridCacheDistributionMode distributionMode() { +@Override protected CacheDistributionMode distributionMode() { return PARTITIONED_ONLY; } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java index 519374c..65c36c9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java @@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration; import org.apache.ignite.cache.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.GridCacheDistributionMode.*; +import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; /** @@ -43,7 +43,7 @@ public class IgniteCacheTxLocalNoLoadPreviousValueTest extends IgniteCacheNoLoad } /** {@inheritDoc} */ -@Override protected GridCacheDistributionMode distributionMode() { +@Override protected CacheDistributionMode distributionMode() { return PARTITIONED_ONLY; } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cafee25f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/int
[43/60] [abbrv] incubator-ignite git commit: # ignite-63
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java index a5fc80b..7c79018 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java @@ -192,8 +192,8 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @return Cache to use in tests. * @throws Exception If failed. */ -private Cache populate() throws Exception { -Cache cache = grid(0).cache(null); +private GridCache populate() throws Exception { +GridCache cache = grid(0).cache(null); assertEquals(0, cache.size()); assertEquals(0, cache.offHeapEntriesCount()); @@ -343,7 +343,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testIterators() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); int cnt = 0; @@ -381,7 +381,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testSql() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); Collection> res = cache.queries(). createSqlQuery(Long.class, "_val >= ? and _val < ?"). @@ -412,7 +412,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testUnswap() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); for (long i = from; i < to; i++) { Long val = cache.promote(i); @@ -438,7 +438,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testUnswapAll() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); Collection keys = new HashSet<>(); @@ -461,7 +461,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testGet() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); for (long i = from; i < to; i++) { Long val = cache.get(i); @@ -485,7 +485,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testPeek() throws Exception { -Cache cache = populate(); +GridCache cache = populate(); for (long i = from; i < to; i++) { assertNull(cache.peek(i)); @@ -510,7 +510,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testIteratorsCleanup() throws Exception { -final Cache cache = populate(); +final GridCache cache = populate(); IgniteFuture offHeapFut = multithreadedAsync(new Runnable() { @Override public void run() { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/168d7d03/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java index 0545b7c..7c93844 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java @@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.*; import org.apache.ignite.cache.*; -import org.apache.ignite.cache.Cache; +import org.apache.ignite.cache.GridCache; import org.apache.ignite.cache.query.*; import org.apache.ignite.cache.store.*; import org.apache.ignite.configuration.*; @@ -112,7 +112,7 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testLoadCache() throws Exception { -Cache cache = cache(