ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [26/26] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-2.0' into ignite-1794
Date Mon, 24 Apr 2017 09:11:52 GMT
Merge remote-tracking branch 'remotes/origin/ignite-2.0' into ignite-1794

# Conflicts:
#	modules/hibernate5/src/main/java/org/apache/ignite/cache/hibernate/HibernateCacheProxy.java


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/bd1966a2
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/bd1966a2
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/bd1966a2

Branch: refs/heads/ignite-1794
Commit: bd1966a2d7af1766e9e859bcd932d587c749d785
Parents: 4f0bc8e 8a1ded1
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Apr 24 11:52:24 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Apr 24 11:52:24 2017 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCache.java     |  11 -
 .../java/org/apache/ignite/IgniteCompute.java   |  14 +
 .../store/jdbc/CacheAbstractJdbcStore.java      |  29 +-
 .../configuration/ExecutorConfiguration.java    | 115 +++++
 .../configuration/IgniteConfiguration.java      |  30 ++
 .../org/apache/ignite/events/CacheEvent.java    |   3 -
 .../java/org/apache/ignite/events/Event.java    |   1 -
 .../org/apache/ignite/events/EventType.java     | 109 -----
 .../apache/ignite/events/SwapSpaceEvent.java    | 105 ----
 .../ignite/internal/ExecutorAwareMessage.java   |  31 ++
 .../ignite/internal/GridJobExecuteRequest.java  |  32 +-
 .../ignite/internal/GridKernalContext.java      |   8 +
 .../ignite/internal/GridKernalContextImpl.java  |  12 +
 .../ignite/internal/GridTaskSessionImpl.java    |  15 +-
 .../ignite/internal/IgniteComputeImpl.java      |  71 ++-
 .../apache/ignite/internal/IgniteKernal.java    |   3 +
 .../org/apache/ignite/internal/IgnitionEx.java  |  66 +++
 .../managers/communication/GridIoManager.java   |  23 +-
 .../managers/communication/GridIoMessage.java   |  13 +
 .../managers/indexing/GridIndexingManager.java  |  44 --
 .../processors/cache/CacheMetricsImpl.java      |  21 -
 .../processors/cache/GridCacheAdapter.java      |   6 -
 .../processors/cache/GridCacheAtomicFuture.java |   5 -
 .../processors/cache/GridCacheContext.java      |  23 -
 .../GridCacheEntryInfoCollectSwapListener.java  |  70 ---
 .../processors/cache/GridCacheMvccManager.java  |  10 +-
 .../processors/cache/GridCacheProcessor.java    |  12 +
 .../processors/cache/GridCacheProxyImpl.java    |  12 -
 .../processors/cache/GridCacheSwapListener.java |  33 --
 .../cache/GridCacheTryPutFailedException.java   |  28 --
 .../processors/cache/IgniteCacheProxy.java      |   6 -
 .../processors/cache/IgniteInternalCache.java   |  11 -
 .../IgniteCacheDatabaseSharedManager.java       |   4 +-
 .../CacheDataStructuresManager.java             |  34 ++
 .../cache/distributed/dht/GridDhtGetFuture.java |  37 +-
 .../dht/GridPartitionedSingleGetFuture.java     |   3 -
 .../GridDhtAtomicAbstractUpdateFuture.java      |   9 +-
 .../dht/atomic/GridDhtAtomicCache.java          |  54 +--
 .../atomic/GridDhtAtomicSingleUpdateFuture.java |   3 -
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |   3 -
 .../GridNearAtomicAbstractUpdateFuture.java     |  79 ++-
 .../GridNearAtomicSingleUpdateFuture.java       | 134 ++----
 .../dht/atomic/GridNearAtomicUpdateFuture.java  | 159 +++----
 .../distributed/near/GridNearAtomicCache.java   |   5 -
 .../distributed/near/GridNearCacheEntry.java    |   4 +-
 .../cache/local/GridLocalLockFuture.java        |   3 -
 .../cache/query/GridCacheQueryManager.java      |  59 ---
 .../cache/store/CacheOsStoreManager.java        |   3 +
 .../store/GridCacheStoreManagerAdapter.java     |  11 +-
 .../closure/GridClosureProcessor.java           | 154 +++---
 .../GridCacheAtomicReferenceImpl.java           | 108 ++++-
 .../GridCacheAtomicStampedImpl.java             |  70 ++-
 .../GridCacheCountDownLatchImpl.java            |   2 +-
 .../datastructures/GridCacheSemaphoreImpl.java  | 240 +++++-----
 .../processors/job/GridJobProcessor.java        |  23 +-
 .../internal/processors/job/GridJobWorker.java  |  15 +-
 .../platform/PlatformContextImpl.java           |  11 -
 .../platform/cache/PlatformCache.java           |  33 +-
 .../platform/cluster/PlatformClusterGroup.java  |  17 +
 .../utils/PlatformConfigurationUtils.java       |   4 +
 .../internal/processors/pool/PoolProcessor.java |  25 +
 .../processors/query/GridQueryIndexing.java     |  19 -
 .../processors/query/GridQueryProcessor.java    | 234 ++++-----
 .../session/GridTaskSessionProcessor.java       |  10 +-
 .../processors/task/GridTaskProcessor.java      |  69 ++-
 .../processors/task/GridTaskWorker.java         |   3 +-
 .../visor/cache/VisorCachePartitionsTask.java   |   2 +-
 .../visor/node/VisorNodeDataCollectorTask.java  |   4 +-
 .../node/VisorNodeDataCollectorTaskResult.java  |   4 +-
 .../apache/ignite/spi/indexing/IndexingSpi.java |  19 -
 .../spi/indexing/noop/NoopIndexingSpi.java      |  10 -
 .../resources/META-INF/classnames.properties    |   1 -
 .../CacheJdbcPojoStoreAbstractSelfTest.java     |  19 +-
 ...BinaryMarshallerStoreKeepBinarySelfTest.java |  28 ++
 ...lerStoreKeepBinaryWithSqlEscapeSelfTest.java |  28 ++
 .../store/jdbc/CacheJdbcPojoStoreTest.java      |   4 +-
 .../internal/TestRecordingCommunicationSpi.java |  29 +-
 ...CacheExchangeMessageDuplicatedStateTest.java |   8 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |  45 --
 .../IgniteCacheConfigVariationsFullApiTest.java |  45 --
 .../IgniteCacheStoreValueAbstractTest.java      |   4 -
 .../cache/IgniteOnePhaseCommitInvokeTest.java   |  10 +-
 .../IgniteTxExceptionAbstractSelfTest.java      |  10 -
 ...CacheAtomicReferenceApiSelfAbstractTest.java |   4 +-
 ...IgniteDataStructuresNoClassOnServerTest.java |  30 ++
 .../CacheLateAffinityAssignmentTest.java        |  31 +-
 .../CacheNoValueClassOnServerNodeTest.java      | 112 +----
 ...tractDistributedByteArrayValuesSelfTest.java |  43 --
 ...heClientMultiNodeUpdateTopologyLockTest.java | 193 ++++++++
 .../IgniteCacheReadFromBackupTest.java          |  15 +-
 .../IgniteNoClassOnServerAbstractTest.java      | 135 ++++++
 .../IgniteTxCachePrimarySyncTest.java           |  17 +-
 .../dht/IgniteCacheTxRecoveryRollbackTest.java  |  17 +-
 .../atomic/IgniteCacheAtomicProtocolTest.java   |  58 +--
 ...tomicClientOnlyMultiNodeFullApiSelfTest.java |  51 +-
 ...achePartitionedMultiNodeFullApiSelfTest.java |  59 ---
 .../GridCachePartitionedTxSalvageSelfTest.java  |   2 +-
 ...idCacheReplicatedUnswapAdvancedSelfTest.java | 151 ------
 .../cache/query/IndexingSpiQuerySelfTest.java   |  22 -
 .../cache/query/IndexingSpiQueryTxSelfTest.java |  10 -
 ...puteCustomExecutorConfigurationSelfTest.java |  85 ++++
 .../IgniteComputeCustomExecutorSelfTest.java    | 245 ++++++++++
 .../loadtests/cache/GridCacheSwapLoadTest.java  | 320 -------------
 .../ignite/testframework/GridTestNode.java      |   7 +
 .../junits/GridTestKernalContext.java           |   5 +-
 .../junits/common/GridCommonAbstractTest.java   |  76 ++-
 .../multijvm/IgniteCacheProcessProxy.java       |   5 -
 ...ObjectsCacheDataStructuresSelfTestSuite.java |   7 +-
 .../ignite/testsuites/IgniteCacheTestSuite.java |   4 +
 .../testsuites/IgniteCacheTestSuite3.java       |   2 -
 .../testsuites/IgniteComputeGridTestSuite.java  |   5 +
 modules/extdata/p2p/pom.xml                     |   6 +
 .../p2p/NoValueClassOnServerAbstractClient.java |  90 ++++
 .../CacheNoValueClassOnServerTestClient.java    |  79 ++-
 ...DataStructuresNoClassOnServerTestClient.java | 181 +++++++
 .../query/h2/opt/GridH2SpatialIndex.java        |  32 +-
 .../cache/hibernate/HibernateCacheProxy.java    |   5 -
 .../processors/query/h2/IgniteH2Indexing.java   |  80 +---
 .../query/h2/database/H2PkHashIndex.java        |   6 +-
 .../query/h2/database/H2TreeIndex.java          |   6 +-
 .../query/h2/database/InlineIndexHelper.java    |  14 -
 .../query/h2/opt/GridH2AbstractKeyValueRow.java |  89 +---
 .../query/h2/opt/GridH2IndexBase.java           |   7 +-
 .../query/h2/opt/GridH2KeyValueRowOffheap.java  |  70 ---
 .../query/h2/opt/GridH2MetaTable.java           |   8 +-
 .../query/h2/opt/GridH2PrimaryScanIndex.java    |   7 +-
 .../processors/query/h2/opt/GridH2Row.java      |   2 +-
 .../query/h2/opt/GridH2RowDescriptor.java       |  11 -
 .../query/h2/opt/GridH2ScanIndex.java           |   4 +-
 .../processors/query/h2/opt/GridH2Table.java    |  94 +---
 .../query/h2/opt/GridH2TreeIndex.java           |   7 +-
 .../processors/query/h2/sql/DmlAstUtils.java    |   3 -
 .../processors/query/h2/sql/GridSqlAlias.java   |  20 +-
 .../query/h2/sql/GridSqlQueryParser.java        |   4 +
 .../processors/query/h2/sql/GridSqlTable.java   |  46 ++
 .../query/h2/twostep/GridMergeIndex.java        |   1 +
 .../query/h2/twostep/GridMergeIndexSorted.java  |   6 +-
 .../h2/twostep/GridMergeIndexUnsorted.java      |   6 +-
 .../query/h2/twostep/GridMergeTable.java        |  12 +-
 .../h2/twostep/GridReduceQueryExecutor.java     |  29 --
 .../query/h2/twostep/GridThreadLocalTable.java  |  14 +-
 ...ryDuplicateIndexObjectsAbstractSelfTest.java | 159 -------
 .../cache/GridCacheOffHeapSelfTest.java         | 476 -------------------
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |  25 -
 ...ateIndexObjectPartitionedAtomicSelfTest.java |  38 --
 ...xObjectPartitionedTransactionalSelfTest.java |  41 --
 .../cache/index/AbstractSchemaSelfTest.java     |  44 +-
 .../DynamicIndexAbstractConcurrentSelfTest.java | 122 +++++
 .../cache/index/SchemaExchangeSelfTest.java     |  57 ++-
 .../query/IgniteQueryDedicatedPoolTest.java     |  10 -
 .../query/IgniteSqlSplitterSelfTest.java        |  34 +-
 .../h2/database/InlineIndexHelperTest.java      |   8 -
 .../query/h2/sql/GridQueryParsingTest.java      |  29 +-
 .../IgniteBinaryCacheQueryTestSuite.java        |   5 -
 .../stream/kafka/connect/IgniteSourceTask.java  |   4 -
 .../ExpiryCacheHolderTest.cs                    |  10 +
 .../Apache.Ignite.Core.Tests.csproj             |   1 +
 .../Cache/Affinity/AffinityFunctionTest.cs      |   2 +-
 .../Cache/CacheAbstractTest.cs                  |  58 ---
 .../Cache/CacheConfigurationTest.cs             |   3 +
 .../Cache/CacheTestAsyncWrapper.cs              |  22 +-
 .../Cache/PartitionLossTest.cs                  | 260 ++++++++++
 .../IgniteConfigurationSerializerTest.cs        |   7 +-
 .../Apache.Ignite.Core.Tests/TestUtils.cs       |   5 +-
 .../Apache.Ignite.Core.csproj                   |   1 +
 .../Cache/Configuration/CacheConfiguration.cs   |  13 +
 .../Cache/Configuration/PartitionLossPolicy.cs  |  68 +++
 .../dotnet/Apache.Ignite.Core/Cache/ICache.cs   |  21 +-
 .../dotnet/Apache.Ignite.Core/IIgnite.cs        |  12 +
 .../IgniteConfigurationSection.xsd              |  15 +
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  |  56 ++-
 .../Apache.Ignite.Core/Impl/Cache/CacheOp.cs    |   6 +-
 .../Impl/Cluster/ClusterGroupImpl.cs            |  27 ++
 .../Impl/Common/DelegateConverter.cs            |   1 +
 .../dotnet/Apache.Ignite.Core/Impl/Ignite.cs    |  16 +-
 .../Apache.Ignite.Core/Impl/IgniteUtils.cs      |  10 +-
 .../Apache.Ignite.Core/Impl/NativeMethods.cs    |   6 +
 .../Impl/Unmanaged/UnmanagedUtils.cs            |   8 +-
 modules/spring-data/pom.xml                     |   2 +-
 .../support/IgniteRepositoryFactoryBean.java    |   7 +
 parent/pom.xml                                  |   6 +-
 181 files changed, 3553 insertions(+), 3675 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bd1966a2/modules/hibernate-core/src/main/java/org/apache/ignite/cache/hibernate/HibernateCacheProxy.java
----------------------------------------------------------------------
diff --cc modules/hibernate-core/src/main/java/org/apache/ignite/cache/hibernate/HibernateCacheProxy.java
index 9c35c51,0000000..000e86e
mode 100644,000000..100644
--- a/modules/hibernate-core/src/main/java/org/apache/ignite/cache/hibernate/HibernateCacheProxy.java
+++ b/modules/hibernate-core/src/main/java/org/apache/ignite/cache/hibernate/HibernateCacheProxy.java
@@@ -1,811 -1,0 +1,806 @@@
 +/*
 + * 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.hibernate;
 +
 +import java.util.Collection;
 +import java.util.HashMap;
 +import java.util.Iterator;
 +import java.util.LinkedList;
 +import java.util.Map;
 +import java.util.Set;
 +import java.util.UUID;
 +import javax.cache.Cache;
 +import javax.cache.expiry.ExpiryPolicy;
 +import javax.cache.processor.EntryProcessor;
 +import javax.cache.processor.EntryProcessorResult;
 +import org.apache.ignite.IgniteCheckedException;
 +import org.apache.ignite.cache.CacheEntry;
 +import org.apache.ignite.cache.CacheMetrics;
 +import org.apache.ignite.cache.CachePeekMode;
 +import org.apache.ignite.cache.affinity.Affinity;
 +import org.apache.ignite.cluster.ClusterGroup;
 +import org.apache.ignite.configuration.CacheConfiguration;
 +import org.apache.ignite.internal.IgniteInternalFuture;
 +import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 +import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
 +import org.apache.ignite.internal.processors.cache.GridCacheContext;
 +import org.apache.ignite.internal.processors.cache.IgniteCacheExpiryPolicy;
 +import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
 +import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal;
 +import org.apache.ignite.lang.IgniteBiPredicate;
 +import org.apache.ignite.mxbean.CacheMetricsMXBean;
 +import org.apache.ignite.transactions.Transaction;
 +import org.apache.ignite.transactions.TransactionConcurrency;
 +import org.apache.ignite.transactions.TransactionIsolation;
 +import org.jetbrains.annotations.Nullable;
 +
 +/**
 + * Hibernate cache proxy used to substitute hibernate keys with ignite keys.
 + */
 +public class HibernateCacheProxy implements IgniteInternalCache<Object, Object> {
 +    /** Delegate. */
 +    private final IgniteInternalCache<Object, Object> delegate;
 +
 +    /** Transformer. */
 +    private final HibernateKeyTransformer keyTransformer;
 +
 +    /**
 +     * @param delegate Delegate.
 +     * @param keyTransformer Key keyTransformer.
 +     */
 +    HibernateCacheProxy(
 +        IgniteInternalCache<Object, Object> delegate,
 +        HibernateKeyTransformer keyTransformer
 +    ) {
 +        assert delegate != null;
 +        assert keyTransformer != null;
 +
 +        this.delegate = delegate;
 +        this.keyTransformer = keyTransformer;
 +    }
 +
 +    /**
 +     * @return HibernateKeyTransformer
 +     */
 +    public HibernateKeyTransformer keyTransformer(){
 +        return keyTransformer;
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public String name() {
 +        return delegate.name();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean skipStore() {
 +        return delegate.skipStore();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalCache setSkipStore(boolean skipStore) {
 +        return delegate.setSkipStore(skipStore);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean isEmpty() {
 +        return delegate.isEmpty();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean containsKey(Object key) {
 +        return delegate.containsKey(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Boolean> containsKeyAsync(Object key) {
 +        return delegate.containsKeyAsync(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean containsKeys(Collection keys) {
 +        return delegate.containsKey(transform(keys));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Boolean> containsKeysAsync(Collection keys)
{
 +        return delegate.containsKeysAsync(transform(keys));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Nullable @Override public Object localPeek(
 +        Object key,
 +        CachePeekMode[] peekModes,
 +        @Nullable IgniteCacheExpiryPolicy plc
 +    ) throws IgniteCheckedException {
 +        return delegate.localPeek(keyTransformer.transform(key), peekModes, plc);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Iterable<Cache.Entry<Object, Object>> localEntries(
 +        CachePeekMode[] peekModes
 +    ) throws IgniteCheckedException {
 +        return delegate.localEntries(peekModes);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Nullable @Override public Object get(Object key) throws IgniteCheckedException {
 +        return delegate.get(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Nullable @Override public CacheEntry getEntry(Object key) throws IgniteCheckedException
{
 +        return delegate.getEntry(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture getAsync(Object key) {
 +        return delegate.getAsync(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<CacheEntry<Object, Object>> getEntryAsync(Object
key) {
 +        return delegate.getEntryAsync(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Map getAll(@Nullable Collection keys) throws IgniteCheckedException
{
 +        return delegate.getAll(transform(keys));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Collection<CacheEntry<Object, Object>> getEntries(
 +        @Nullable Collection keys) throws IgniteCheckedException {
 +        return delegate.getEntries(transform(keys));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Map<Object, Object>> getAllAsync(@Nullable
Collection keys) {
 +        return delegate.getAllAsync(transform(keys));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Collection<CacheEntry<Object,Object>>>
getEntriesAsync(
 +        @Nullable Collection keys
 +    ) {
 +        return delegate.getEntriesAsync(transform(keys));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Nullable @Override public Object getAndPut(Object key, Object val) throws IgniteCheckedException
{
 +        return delegate.getAndPut(keyTransformer.transform(key), val);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture getAndPutAsync(Object key, Object val) {
 +        return delegate.getAndPutAsync(keyTransformer.transform(key), val);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean put(Object key, Object val) throws IgniteCheckedException {
 +        return delegate.put(keyTransformer.transform(key), val);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Boolean> putAsync(Object key, Object val)
{
 +        return delegate.putAsync(keyTransformer.transform(key), val);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Nullable @Override public Object getAndPutIfAbsent(Object key, Object val) throws IgniteCheckedException
{
 +        return delegate.getAndPutIfAbsent(keyTransformer.transform(key), val);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture getAndPutIfAbsentAsync(Object key, Object val)
{
 +        return delegate.getAndPutIfAbsentAsync(keyTransformer.transform(key), val);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean putIfAbsent(Object key, Object val) throws IgniteCheckedException
{
 +        return delegate.putIfAbsent(keyTransformer.transform(key), val);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Boolean> putIfAbsentAsync(Object key, Object
val) {
 +        return delegate.putIfAbsentAsync(keyTransformer.transform(key), val);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Nullable @Override public Object getAndReplace(Object key, Object val) throws IgniteCheckedException
{
 +        return delegate.getAndReplace(keyTransformer.transform(key), val);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture getAndReplaceAsync(Object key, Object val) {
 +        return delegate.getAndReplaceAsync(keyTransformer.transform(key), val);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean replace(Object key, Object val) throws IgniteCheckedException
{
 +        return delegate.replace(keyTransformer.transform(key), val);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Boolean> replaceAsync(Object key, Object
val) {
 +        return delegate.replaceAsync(keyTransformer.transform(key), val);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean replace(Object key, Object oldVal, Object newVal) throws IgniteCheckedException
{
 +        return delegate.replace(keyTransformer.transform(key), oldVal, newVal);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Boolean> replaceAsync(Object key, Object
oldVal, Object newVal) {
 +        return delegate.replaceAsync(keyTransformer.transform(key), oldVal, newVal);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void putAll(@Nullable Map m) throws IgniteCheckedException {
 +        delegate.putAll(transform(m));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<?> putAllAsync(@Nullable Map m) {
 +        return delegate.putAllAsync(transform(m));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Set keySet() {
 +        return delegate.keySet();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Set keySetx() {
 +        return delegate.keySetx();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Set primaryKeySet() {
 +        return delegate.primaryKeySet();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Iterable values() {
 +        return delegate.values();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Set<Cache.Entry<Object, Object>> entrySet() {
 +        return delegate.entrySet();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Nullable @Override public Set<Cache.Entry<Object,Object>> entrySet(int
part) {
 +        return delegate.entrySet(part);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Set<Cache.Entry<Object, Object>> entrySetx(CacheEntryPredicate...
filter) {
 +        return delegate.entrySetx(filter);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Transaction txStart(
 +        TransactionConcurrency concurrency,
 +        TransactionIsolation isolation
 +    ) {
 +        return delegate.txStart(concurrency, isolation);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public GridNearTxLocal txStartEx(
 +        TransactionConcurrency concurrency,
 +        TransactionIsolation isolation
 +    ) {
 +        return delegate.txStartEx(concurrency, isolation);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Transaction txStart(
 +        TransactionConcurrency concurrency,
 +        TransactionIsolation isolation,
 +        long timeout,
 +        int txSize
 +    ) {
 +        return delegate.txStart(concurrency, isolation, timeout, txSize);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Nullable @Override public GridNearTxLocal tx() {
 +        return delegate.tx();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean evict(Object key) {
 +        return delegate.evict(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void evictAll(@Nullable Collection keys) {
 +        delegate.evictAll(transform(keys));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void clearLocally(boolean srv, boolean near, boolean readers) {
 +        delegate.clearLocally(srv, near, readers);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean clearLocally(Object key) {
 +        return delegate.clearLocally(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void clearLocallyAll(Set keys, boolean srv, boolean near, boolean readers)
{
 +        delegate.clearLocallyAll((Set<?>)transform(keys), srv, near, readers);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void clear(Object key) throws IgniteCheckedException {
 +        delegate.clear(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void clearAll(Set keys) throws IgniteCheckedException {
 +        delegate.clearAll((Set<?>)transform(keys));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void clear() throws IgniteCheckedException {
 +        delegate.clear();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<?> clearAsync() {
 +        return delegate.clearAsync();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<?> clearAsync(Object key) {
 +        return delegate.clearAsync(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<?> clearAllAsync(Set keys) {
 +        return delegate.clearAllAsync((Set<?>)transform(keys));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Nullable @Override public Object getAndRemove(Object key) throws IgniteCheckedException
{
 +        return delegate.getAndRemove(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture getAndRemoveAsync(Object key) {
 +        return delegate.getAndRemoveAsync(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean remove(Object key) throws IgniteCheckedException {
 +        return delegate.remove(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Boolean> removeAsync(Object key) {
 +        return delegate.removeAsync(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean remove(Object key, Object val) throws IgniteCheckedException
{
 +        return delegate.remove(keyTransformer.transform(key), val);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Boolean> removeAsync(Object key, Object
val) {
 +        return delegate.removeAsync(keyTransformer.transform(key), val);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void removeAll(@Nullable Collection keys) throws IgniteCheckedException
{
 +        delegate.removeAll(transform(keys));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<?> removeAllAsync(@Nullable Collection keys)
{
 +        return delegate.removeAllAsync(transform(keys));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void removeAll() throws IgniteCheckedException {
 +        delegate.removeAll();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<?> removeAllAsync() {
 +        return delegate.removeAllAsync();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean lock(Object key, long timeout) throws IgniteCheckedException
{
 +        return delegate.lock(keyTransformer.transform(key), timeout);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Boolean> lockAsync(Object key, long timeout)
{
 +        return delegate.lockAsync(keyTransformer.transform(key), timeout);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean lockAll(@Nullable Collection keys, long timeout) throws IgniteCheckedException
{
 +        return delegate.lockAll(transform(keys), timeout);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Boolean> lockAllAsync(@Nullable Collection
keys, long timeout) {
 +        return delegate.lockAllAsync(transform(keys), timeout);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void unlock(Object key) throws IgniteCheckedException {
 +        delegate.unlock(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void unlockAll(@Nullable Collection keys) throws IgniteCheckedException
{
 +        delegate.unlockAll(transform(keys));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean isLocked(Object key) {
 +        return delegate.isLocked(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean isLockedByThread(Object key) {
 +        return delegate.isLockedByThread(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public int size() {
 +        return delegate.size();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public long sizeLong() {
 +        return delegate.sizeLong();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public int localSize(CachePeekMode[] peekModes) throws IgniteCheckedException
{
 +        return delegate.localSize(peekModes);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public long localSizeLong(CachePeekMode[] peekModes) throws IgniteCheckedException
{
 +        return delegate.localSizeLong(peekModes);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public long localSizeLong(int partition, CachePeekMode[] peekModes) throws
IgniteCheckedException {
 +        return delegate.localSizeLong(partition, peekModes);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public int size(CachePeekMode[] peekModes) throws IgniteCheckedException {
 +        return delegate.size(peekModes);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public long sizeLong(CachePeekMode[] peekModes) throws IgniteCheckedException
{
 +        return delegate.sizeLong(peekModes);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public long sizeLong(int partition, CachePeekMode[] peekModes) throws IgniteCheckedException
{
 +        return delegate.sizeLong(partition, peekModes);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Integer> sizeAsync(CachePeekMode[] peekModes)
{
 +        return delegate.sizeAsync(peekModes);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Long> sizeLongAsync(CachePeekMode[] peekModes)
{
 +        return delegate.sizeLongAsync(peekModes);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Long> sizeLongAsync(int partition, CachePeekMode[]
peekModes) {
 +        return delegate.sizeLongAsync(partition, peekModes);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public int nearSize() {
 +        return delegate.nearSize();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public int primarySize() {
 +        return delegate.primarySize();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public long primarySizeLong() {
 +        return delegate.primarySizeLong();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public CacheConfiguration configuration() {
 +        return delegate.configuration();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Affinity affinity() {
 +        return delegate.affinity();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public CacheMetrics clusterMetrics() {
 +        return delegate.clusterMetrics();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public CacheMetrics clusterMetrics(ClusterGroup grp) {
 +        return delegate.clusterMetrics(grp);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public CacheMetrics localMetrics() {
 +        return delegate.localMetrics();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public CacheMetricsMXBean clusterMxBean() {
 +        return delegate.clusterMxBean();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public CacheMetricsMXBean localMxBean() {
 +        return delegate.localMxBean();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public long offHeapEntriesCount() {
 +        return delegate.offHeapEntriesCount();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public long offHeapAllocatedSize() {
 +        return delegate.offHeapAllocatedSize();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<?> rebalance() {
 +        return delegate.rebalance();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalCache forSubjectId(UUID subjId) {
 +        return delegate.forSubjectId(subjId);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Nullable @Override public Object getForcePrimary(Object key) throws IgniteCheckedException
{
 +        return delegate.getForcePrimary(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture getForcePrimaryAsync(Object key) {
 +        return delegate.getForcePrimaryAsync(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Map getAllOutTx(Set keys) throws IgniteCheckedException {
 +        return delegate.getAllOutTx((Set<?>)transform(keys));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Map<Object, Object>> getAllOutTxAsync(Set
keys) {
 +        return delegate.getAllOutTxAsync((Set<?>)transform(keys));
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean isIgfsDataCache() {
 +        return delegate.isIgfsDataCache();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public long igfsDataSpaceUsed() {
 +        return delegate.igfsDataSpaceUsed();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public long igfsDataSpaceMax() {
 +        return delegate.igfsDataSpaceMax();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean isMongoDataCache() {
 +        return delegate.isMongoDataCache();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean isMongoMetaCache() {
 +        return delegate.isMongoMetaCache();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Nullable @Override public ExpiryPolicy expiry() {
 +        return delegate.expiry();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalCache withExpiryPolicy(ExpiryPolicy plc) {
 +        return delegate.withExpiryPolicy(plc);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalCache withNoRetries() {
 +        return delegate.withNoRetries();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public GridCacheContext context() {
 +        return delegate.context();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void localLoadCache(
 +        @Nullable IgniteBiPredicate p,
 +        @Nullable Object... args
 +    ) throws IgniteCheckedException {
 +        delegate.localLoadCache(p, args);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<?> localLoadCacheAsync(
 +        @Nullable IgniteBiPredicate p,
 +        @Nullable Object... args
 +    ) {
 +        return delegate.localLoadCacheAsync(p, args);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Object getTopologySafe(Object key) throws IgniteCheckedException {
 +        return delegate.getTopologySafe(keyTransformer.transform(key));
 +    }
 +
 +    /** {@inheritDoc} */
-     @Nullable @Override public Object tryGetAndPut(Object key, Object val) throws IgniteCheckedException
{
-         return delegate.tryGetAndPut(keyTransformer.transform(key), val);
-     }
- 
-     /** {@inheritDoc} */
 +    @Override public Collection<Integer> lostPartitions() {
 +        return delegate.lostPartitions();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Nullable @Override public EntryProcessorResult invoke(
 +        @Nullable AffinityTopologyVersion topVer,
 +        Object key,
 +        EntryProcessor entryProcessor,
 +        Object... args
 +    ) throws IgniteCheckedException {
 +        return delegate.invoke(topVer, key, entryProcessor, args);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Map> invokeAllAsync(Map map, Object... args)
{
 +        return delegate.invokeAllAsync(map, args);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Map invokeAll(Map map, Object... args) throws IgniteCheckedException
{
 +        return delegate.invokeAll(map, args);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<Map> invokeAllAsync(Set keys, EntryProcessor
entryProcessor, Object... args) {
 +        return delegate.invokeAllAsync((Set<?>)transform(keys), entryProcessor, args);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Map invokeAll(Set keys, EntryProcessor entryProcessor, Object... args)
throws IgniteCheckedException {
 +        return delegate.invokeAll((Set<?>)transform(keys), entryProcessor, args);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<EntryProcessorResult> invokeAsync(
 +        Object key,
 +        EntryProcessor entryProcessor,
 +        Object... args
 +    ) {
 +        return delegate.invokeAsync(keyTransformer.transform(key), entryProcessor, args);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Nullable @Override public EntryProcessorResult invoke(
 +        Object key,
 +        EntryProcessor entryProcessor,
 +        Object... args
 +    ) throws IgniteCheckedException {
 +        return delegate.invoke(keyTransformer.transform(key), entryProcessor, args);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Iterator<Cache.Entry<Object,Object>> scanIterator(
 +        boolean keepBinary,
 +        @Nullable IgniteBiPredicate p
 +    ) throws IgniteCheckedException {
 +        return delegate.scanIterator(keepBinary, p);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<?> removeAllConflictAsync(Map drMap) throws
IgniteCheckedException {
 +        return delegate.removeAllConflictAsync(drMap);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void removeAllConflict(Map drMap) throws IgniteCheckedException {
 +        delegate.removeAllConflictAsync(drMap);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalFuture<?> putAllConflictAsync(Map drMap) throws
IgniteCheckedException {
 +        return delegate.putAllConflictAsync(drMap);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void putAllConflict(Map drMap) throws IgniteCheckedException {
 +        delegate.putAllConflict(drMap);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalCache keepBinary() {
 +        return delegate.keepBinary();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public IgniteInternalCache cache() {
 +        return delegate.cache();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public Iterator iterator() {
 +        return delegate.iterator();
 +    }
 +
 +    /**
 +     * @param keys Keys.
 +     */
 +    private Collection<Object> transform(Collection<Object> keys) {
 +        Collection<Object> res = new LinkedList<>();
 +
 +        for (Object o : keys)
 +            res.add(keyTransformer.transform(o));
 +
 +        return res;
 +    }
 +
 +    /**
 +     * @param map Map.
 +     */
 +    private Map<Object, Object> transform(Map<Object, Object> map) {
 +        Map<Object, Object> res = new HashMap<>();
 +
 +        Set<Map.Entry<Object, Object>> ents = map.entrySet();
 +
 +        for (Map.Entry<Object, Object> e : ents)
 +            res.put(keyTransformer.transform(e.getKey()), e.getValue());
 +
 +        return res;
 +    }
 +}


Mime
View raw message