ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [49/50] [abbrv] incubator-ignite git commit: IGNITE-50 WIP
Date Thu, 12 Feb 2015 12:18:32 GMT
IGNITE-50 WIP


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

Branch: refs/heads/ignite-50
Commit: 82cb9fccaa9d24b53fee881fb6f8596e652821dd
Parents: d106f4e
Author: nikolay_tikhonov <ntikhonov@gridgain.com>
Authored: Thu Feb 12 12:14:03 2015 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Thu Feb 12 15:00:55 2015 +0300

----------------------------------------------------------------------
 .../GridDeploymentPerVersionStore.java          |   4 +-
 .../processors/cache/GridCacheProcessor.java    |  13 --
 .../cache/GridCacheProjectionImpl.java          |  27 +---
 .../GridCacheContinuousQueryManager.java        |  16 +--
 ...IgniteCacheAbstractExecutionContextTest.java | 142 ++-----------------
 .../IgniteCacheAtomicExecutionContextTest.java  |   2 +-
 .../IgniteCacheTxExecutionContextTest.java      |   2 +-
 .../p2p/CacheEntryListenerConfiguration.java    |  60 --------
 .../tests/p2p/CacheEntryProcessorNoop.java      |  37 -----
 .../ignite/tests/p2p/CacheExpirePolicyNoop.java |  45 ------
 .../apache/ignite/tests/p2p/CacheStoreNoop.java |  88 ------------
 .../apache/ignite/tests/p2p/CacheTestValue.java |  26 ++++
 12 files changed, 47 insertions(+), 415 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/82cb9fcc/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentPerVersionStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentPerVersionStore.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentPerVersionStore.java
index b4d308a..0157f76 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentPerVersionStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentPerVersionStore.java
@@ -663,7 +663,7 @@ public class GridDeploymentPerVersionStore extends GridDeploymentStoreAdapter
{
                 meta.deploymentMode(),
                 true,
                 ctx,
-                U.gridClassLoader(),
+                ctx.config().getClassLoader() != null ? ctx.config().getClassLoader() : U.gridClassLoader(),
                 meta.classLoaderId(),
                 meta.senderNodeId(),
                 comm,
@@ -965,7 +965,7 @@ public class GridDeploymentPerVersionStore extends GridDeploymentStoreAdapter
{
                 meta.deploymentMode(),
                 false,
                 ctx,
-                U.gridClassLoader(),
+                ctx.config().getClassLoader() != null ? ctx.config().getClassLoader() : U.gridClassLoader(),
                 meta.classLoaderId(),
                 meta.senderNodeId(),
                 comm,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/82cb9fcc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 8a22daa..1c2499d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -28,11 +28,6 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.*;
-import org.apache.ignite.internal.processors.cache.version.*;
-import org.apache.ignite.internal.util.*;
-import org.apache.ignite.lifecycle.*;
-import org.apache.ignite.marshaller.*;
-import org.apache.ignite.spi.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 import org.apache.ignite.internal.processors.cache.distributed.dht.*;
 import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.*;
@@ -601,14 +596,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
             CacheStore cfgStore = cfg.getCacheStoreFactory() != null ? cfg.getCacheStoreFactory().create()
: null;
 
-            if (ctx.config().getClassLoader() != null && cfg.getCacheStoreFactory()
!= null) {
-                IgniteMarshaller marsh = ctx.config().getMarshaller();
-
-                byte[] bytes = marsh.marshal(cfgStore);
-
-                cfgStore = marsh.unmarshal(bytes, ctx.config().getClassLoader());
-            }
-
             validate(ctx.config(), cfg, cfgStore);
 
             CacheJtaManagerAdapter jta = JTA.create(cfg.getTransactionManagerLookupClassName()
== null);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/82cb9fcc/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 89c60b6..e076d8d 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
@@ -22,12 +22,6 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.processors.cache.version.*;
-import org.apache.ignite.internal.util.*;
-import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.*;
-import org.apache.ignite.portables.*;
-import org.apache.ignite.transactions.*;
 import org.apache.ignite.internal.processors.cache.dr.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.processors.cache.transactions.*;
@@ -150,26 +144,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K,
V
 
         this.keepPortable = keepPortable;
 
-        if (cctx.gridConfig().getClassLoader() == null)
-            this.expiryPlc = expiryPlc;
-        else
-            this.expiryPlc = loadExpiryPolicy(expiryPlc);
-    }
-
-    private ExpiryPolicy loadExpiryPolicy(ExpiryPolicy expiryPlc) {
-        try {
-            if (expiryPlc == null)
-                return null;
-
-            IgniteMarshaller marsh = cctx.gridConfig().getMarshaller();
-
-            byte[] bytes = marsh.marshal(expiryPlc);
-
-            return marsh.unmarshal(bytes, cctx.gridConfig().getClassLoader());
-        }
-        catch (Exception e){
-            throw new CacheException("Failed to load expiry policy by user's class loader.",
e);
-        }
+        this.expiryPlc = expiryPlc;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/82cb9fcc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryManager.java
index fa12124..3207f0a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryManager.java
@@ -21,9 +21,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.internal.processors.cache.*;
-import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.*;
-import org.apache.ignite.resources.*;
 import org.apache.ignite.internal.processors.cache.CacheEntryEvent;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
@@ -223,18 +220,7 @@ public class GridCacheContinuousQueryManager<K, V> extends GridCacheManagerAdapt
 
             A.notNull(factory, "cacheEntryListenerFactory");
 
-            CacheEntryListener lsnr;
-
-            if (cctx.gridConfig().getClassLoader() == null)
-                lsnr = factory.create();
-            else {
-                IgniteMarshaller marsh = cctx.gridConfig().getMarshaller();
-
-                byte[] bytes = marsh.marshal(factory);
-
-                lsnr = ((Factory<CacheEntryListener<? super K, ? super V>>)marsh
-                    .unmarshal(bytes, cctx.gridConfig().getClassLoader())).create();
-            }
+            CacheEntryListener lsnr = factory.create();
 
             A.notNull(lsnr, "lsnr");
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/82cb9fcc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java
index 60802c6..ff5310f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java
@@ -18,38 +18,19 @@
 package org.apache.ignite.internal.processors.cache.context;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.processors.cache.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.testframework.*;
 import org.apache.ignite.testframework.config.*;
 
-import javax.cache.*;
-import javax.cache.configuration.*;
-import javax.cache.expiry.*;
-import javax.cache.processor.*;
 import java.net.*;
-import java.util.*;
 
 /**
  *
  */
 public abstract class IgniteCacheAbstractExecutionContextTest extends IgniteCacheAbstractTest
{
-    /**  */
-    public static final int ITERATIONS = 1000;
-
-    /** */
-    public static final String EXPIRY_POLICY_CLASS = "org.apache.ignite.tests.p2p.CacheExpirePolicyNoop";
-
-    /** */
-    public static final String ENTRY_LISTENER_CLASS = "org.apache.ignite.tests.p2p.CacheEntryListenerConfiguration";
-
-    /** */
-    public static final String ENTRY_PROCESSOR_CLASS = "org.apache.ignite.tests.p2p.CacheEntryProcessorNoop";
-
     /** */
-    public static final String CACHE_STORE_CLASS = "org.apache.ignite.tests.p2p.CacheStoreNoop";
+    public static final String TEST_VALUE = "org.apache.ignite.tests.p2p.CacheTestValue";
 
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
@@ -65,99 +46,28 @@ public abstract class IgniteCacheAbstractExecutionContextTest extends
IgniteCach
         return 3;
     }
 
-    /** {@inheritDoc} */
-    @Override protected CacheStore<?, ?> cacheStore() {
-        try {
-            return loadClass(new UsersClassLoader(), CACHE_STORE_CLASS);
-        }
-        catch (Exception e){
-            throw new CacheException(e);
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testEntryProcessor() throws Exception {
-        UsersClassLoader classLdr = (UsersClassLoader)ignite(0).configuration().getClassLoader();
-
-        IgniteCache<Object, Object> cache = ignite(0).jcache(null);
-
-        Set<Integer> keys = new TreeSet<>();
-
-        for (int i = 0; i < ITERATIONS; i++) {
-            cache.put(i, i);
-
-            keys.add(i);
-        }
-
-        Map<Object, EntryProcessorResult<Object>> res = cache.invokeAll(
-            keys,
-            this.<EntryProcessor<Object, Object, Object>>loadClass(classLdr,
ENTRY_PROCESSOR_CLASS));
-
-        assertEquals(ITERATIONS, res.size());
-
-        for (EntryProcessorResult<Object> val : res.values())
-            assertEquals(42, (long)val.get());
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testCacheEntryListener() throws Exception {
-        UsersClassLoader classLdr = (UsersClassLoader)ignite(0).configuration().getClassLoader();
-
-        IgniteCache<Object, Object> cache = ignite(0).jcache(null);
-
-        CacheEntryListenerConfiguration<Object, Object> list = loadClass(ignite(0).configuration().getClassLoader(),
-            ENTRY_LISTENER_CLASS);
-
-        cache.registerCacheEntryListener(list);
-
-        for (int i = ITERATIONS; i < 2 * ITERATIONS; i++)
-            cache.put(i, i);
-
-        assertEquals(ITERATIONS, U.invoke(list.getClass(), list, "getCnt", null));
-        assertEquals(2, (int)classLdr.classUsedCnt(ENTRY_LISTENER_CLASS));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testExpirePolicies() throws Exception {
-        UsersClassLoader classLdr = (UsersClassLoader)ignite(0).configuration().getClassLoader();
-
-        IgniteCache<Object, Object> cache = ignite(0).jcache(null);
-
-        cache.withExpiryPolicy(this.<ExpiryPolicy>loadClass(classLdr, EXPIRY_POLICY_CLASS));
-
-        assertEquals(2, (int)classLdr.classUsedCnt(EXPIRY_POLICY_CLASS));
-    }
-
     /**
      * @throws Exception If failed.
      */
-    public void testCacheLoaderWriter() throws Exception {
-        IgniteCache<Object, Object> cache = ignite(0).jcache(null);
+    public void testUsersClassLoader() throws Exception {
+        UsersClassLoader testClassLdr = new UsersClassLoader();
 
-        UsersClassLoader classLdr = (UsersClassLoader)ignite(0).configuration().getClassLoader();
+        Object val = testClassLdr.loadClass(TEST_VALUE).newInstance();
 
-        assertEquals(42L, cache.get(99999999999999L));
+        IgniteCache<Object, Object> jcache = grid(0).jcache(null);
 
-        assertEquals(1, (int)classLdr.classUsedCnt(CACHE_STORE_CLASS));
-    }
-
-    /**
-     * @return Loaded class.
-     * @throws Exception Thrown if any exception occurs.
-     */
-    private <T> T loadClass(ClassLoader usersClassLdr, String className)
-        throws Exception {
-        assertNotNull(usersClassLdr);
+        for (int i = 0; i < 1000; i++)
+            jcache.put(i, val);
 
-        assertNotNull(usersClassLdr.loadClass(className));
+        for (int i = 0; i < 1000; i++) {
+            int idx = i % 3;
 
-        return (T)usersClassLdr.loadClass(className).newInstance();
+            if (idx == 0)
+                assertEquals(jcache.get(i).getClass().getClassLoader(), testClassLdr);
+            else
+                assertEquals(grid(idx).jcache(null).get(i).getClass().getClassLoader(),
+                    grid(idx).configuration().getClassLoader());
+        }
     }
 
     /**
@@ -166,32 +76,10 @@ public abstract class IgniteCacheAbstractExecutionContextTest extends
IgniteCach
     private static class UsersClassLoader extends GridTestExternalClassLoader {
         /**
          *
-         */
-        private Map<String, Integer> loadedClasses = new HashMap<>();
-
-        /**
-         *
          * @throws MalformedURLException If failed
          */
         public UsersClassLoader() throws MalformedURLException {
             super(new URL[]{new URL(GridTestProperties.getProperty("p2p.uri.cls"))});
         }
-
-        /**
-         *
-         */
-        @Override public Class<?> loadClass(String name) throws ClassNotFoundException
{
-            int count = !loadedClasses.containsKey(name) ? 0 : loadedClasses.get(name);
-
-            ++count;
-
-            loadedClasses.put(name, count);
-
-            return super.loadClass(name);
-        }
-
-        public Integer classUsedCnt(String name){
-            return loadedClasses.get(name);
-        }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/82cb9fcc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAtomicExecutionContextTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAtomicExecutionContextTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAtomicExecutionContextTest.java
index da80b92..c09c8cd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAtomicExecutionContextTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAtomicExecutionContextTest.java
@@ -29,7 +29,7 @@ import static org.apache.ignite.cache.CacheDistributionMode.*;
 public class IgniteCacheAtomicExecutionContextTest extends IgniteCacheAbstractExecutionContextTest
{
     /** {@inheritDoc} */
     @Override protected CacheMode cacheMode() {
-        return CacheMode.LOCAL;
+        return CacheMode.PARTITIONED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/82cb9fcc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheTxExecutionContextTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheTxExecutionContextTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheTxExecutionContextTest.java
index 9817904..adc83c1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheTxExecutionContextTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheTxExecutionContextTest.java
@@ -29,7 +29,7 @@ import static org.apache.ignite.cache.CacheDistributionMode.*;
 public class IgniteCacheTxExecutionContextTest extends IgniteCacheAbstractExecutionContextTest
{
     /** {@inheritDoc} */
     @Override protected CacheMode cacheMode() {
-        return CacheMode.LOCAL;
+        return CacheMode.PARTITIONED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/82cb9fcc/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheEntryListenerConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheEntryListenerConfiguration.java
b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheEntryListenerConfiguration.java
deleted file mode 100644
index 92d0d12..0000000
--- a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheEntryListenerConfiguration.java
+++ /dev/null
@@ -1,60 +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.tests.p2p;
-
-import javax.cache.configuration.*;
-import javax.cache.event.*;
-import java.util.concurrent.atomic.*;
-
-/**
- * Entry processor for testing user's class loader.
- */
-public class CacheEntryListenerConfiguration extends MutableCacheEntryListenerConfiguration<Integer,
Integer> {
-    /** */
-    public final static AtomicInteger CNT = new AtomicInteger(0);
-
-    /**
-     *
-     */
-    public CacheEntryListenerConfiguration() {
-        super(new Factory<CacheEntryListener<Integer, Integer>>() {
-            /** {@inheritDoc} */
-            @Override public CacheEntryListener<Integer, Integer> create() {
-                return new EntryListener();
-            }
-        }, null, true, true);
-    }
-
-    /**
-     *
-     */
-    public static class EntryListener implements CacheEntryCreatedListener<Integer, Integer>
{
-        /** {@inheritDoc} */
-        @Override public void onCreated(Iterable iterable) throws CacheEntryListenerException
{
-            for (Object entry : iterable) {
-                assert entry != null;
-
-                CNT.incrementAndGet();
-            }
-        }
-    }
-
-    public static int getCnt() {
-        return CNT.get();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/82cb9fcc/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheEntryProcessorNoop.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheEntryProcessorNoop.java
b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheEntryProcessorNoop.java
deleted file mode 100644
index c59c531..0000000
--- a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheEntryProcessorNoop.java
+++ /dev/null
@@ -1,37 +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.tests.p2p;
-
-import javax.cache.processor.*;
-
-/**
- * Entry processor for testing user's class loader.
- */
-public class CacheEntryProcessorNoop implements EntryProcessor<Object, Object, Object>
{
-    /**
-     *
-     */
-    public CacheEntryProcessorNoop() {
-    }
-
-    @Override public Object process(MutableEntry<Object, Object> entry, Object... arguments)
-        throws EntryProcessorException {
-
-        return 42L;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/82cb9fcc/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheExpirePolicyNoop.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheExpirePolicyNoop.java
b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheExpirePolicyNoop.java
deleted file mode 100644
index 18846b3..0000000
--- a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheExpirePolicyNoop.java
+++ /dev/null
@@ -1,45 +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.tests.p2p;
-
-import javax.cache.expiry.*;
-/**
- * Entry processor for testing user's class loader.
- */
-public class CacheExpirePolicyNoop implements ExpiryPolicy {
-    /**
-     *
-     */
-    public CacheExpirePolicyNoop() {
-    }
-
-    /** {@inheritDoc} */
-    @Override public Duration getExpiryForCreation() {
-        return Duration.ETERNAL;
-    }
-
-    /** {@inheritDoc} */
-    @Override public Duration getExpiryForAccess() {
-        return Duration.ETERNAL;
-    }
-
-    /** {@inheritDoc} */
-    @Override public Duration getExpiryForUpdate() {
-        return Duration.ETERNAL;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/82cb9fcc/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheStoreNoop.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheStoreNoop.java
b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheStoreNoop.java
deleted file mode 100644
index 6e3f29f..0000000
--- a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheStoreNoop.java
+++ /dev/null
@@ -1,88 +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.tests.p2p;
-
-import org.apache.ignite.cache.store.*;
-
-import javax.cache.*;
-import javax.cache.integration.*;
-import java.util.concurrent.atomic.*;
-
-/**
- *
- */
-public class CacheStoreNoop extends CacheStoreAdapter {
-    /** */
-    private static final AtomicInteger loadCnt = new AtomicInteger(0);
-
-    /** */
-    private static final AtomicInteger writeCnt = new AtomicInteger(0);
-
-    /** */
-    private static final AtomicInteger deleteCnt = new AtomicInteger(0);
-
-    /** */
-    private static boolean isInjected;
-
-    /** {@inheritDoc} */
-    @Override public Object load(Object key) throws CacheLoaderException {
-        loadCnt.incrementAndGet();
-
-        isInjected = ignite() != null;
-
-        return 42L;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void write(Cache.Entry entry) throws CacheWriterException {
-        writeCnt.incrementAndGet();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void delete(Object key) throws CacheWriterException {
-        deleteCnt.incrementAndGet();
-    }
-
-    /**
-     *
-     */
-    public static int getLoadCnt() {
-        return loadCnt.get();
-    }
-
-    /**
-     *
-     */
-    public static int getWriteCnt() {
-        return writeCnt.get();
-    }
-
-    /**
-     *
-     */
-    public static int getDeleteCnt() {
-        return deleteCnt.get();
-    }
-
-    /**
-     *
-     */
-    public boolean isInjected() {
-        return isInjected;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/82cb9fcc/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheTestValue.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheTestValue.java
b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheTestValue.java
new file mode 100644
index 0000000..827cccd
--- /dev/null
+++ b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheTestValue.java
@@ -0,0 +1,26 @@
+/*
+ * 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.tests.p2p;
+
+import java.io.Serializable;
+
+/**
+ * Value object for {@code IgniteCacheAbstractExecutionContextTest}.
+ */
+public class CacheTestValue implements Serializable {
+}


Mime
View raw message