ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [1/3] ignite git commit: IGNITE-5879 .NET: Move TestPlatformPlugin to a separate module
Date Tue, 05 Sep 2017 12:01:15 GMT
Repository: ignite
Updated Branches:
  refs/heads/master dab27856c -> 8f13169b2


http://git-wip-us.apache.org/repos/asf/ignite/blob/c42a9eac/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/PlatformTestCachePluginConfigurationClosure.java
----------------------------------------------------------------------
diff --git a/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/PlatformTestCachePluginConfigurationClosure.java
b/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/PlatformTestCachePluginConfigurationClosure.java
new file mode 100644
index 0000000..2763c4f
--- /dev/null
+++ b/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/PlatformTestCachePluginConfigurationClosure.java
@@ -0,0 +1,48 @@
+/*
+ * 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.platform.plugin.cache;
+
+import org.apache.ignite.binary.BinaryRawReader;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.plugin.CachePluginConfiguration;
+import org.apache.ignite.plugin.platform.PlatformCachePluginConfigurationClosure;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+/**
+ * Test config closure.
+ */
+public class PlatformTestCachePluginConfigurationClosure implements PlatformCachePluginConfigurationClosure
{
+    /** {@inheritDoc} */
+    @Override public void apply(CacheConfiguration cacheConfiguration, BinaryRawReader reader)
{
+        ArrayList<CachePluginConfiguration> cfgs = new ArrayList<>();
+
+        if (cacheConfiguration.getPluginConfigurations() != null) {
+            Collections.addAll(cfgs, cacheConfiguration.getPluginConfigurations());
+        }
+
+        PlatformTestCachePluginConfiguration plugCfg = new PlatformTestCachePluginConfiguration();
+
+        plugCfg.setPluginProperty(reader.readString());
+
+        cfgs.add(plugCfg);
+
+        cacheConfiguration.setPluginConfigurations(cfgs.toArray(new CachePluginConfiguration[cfgs.size()]));
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c42a9eac/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/PlatformTestCachePluginConfigurationClosureFactory.java
----------------------------------------------------------------------
diff --git a/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/PlatformTestCachePluginConfigurationClosureFactory.java
b/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/PlatformTestCachePluginConfigurationClosureFactory.java
new file mode 100644
index 0000000..c294342
--- /dev/null
+++ b/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/PlatformTestCachePluginConfigurationClosureFactory.java
@@ -0,0 +1,37 @@
+/*
+ * 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.platform.plugin.cache;
+
+import org.apache.ignite.plugin.platform.PlatformCachePluginConfigurationClosure;
+import org.apache.ignite.plugin.platform.PlatformCachePluginConfigurationClosureFactory;
+
+/**
+ * Test closure factory.
+ */
+public class PlatformTestCachePluginConfigurationClosureFactory
+    implements PlatformCachePluginConfigurationClosureFactory {
+    /** {@inheritDoc} */
+    @Override public int id() {
+        return 0;
+    }
+
+    /** {@inheritDoc} */
+    @Override public PlatformCachePluginConfigurationClosure create() {
+        return new PlatformTestCachePluginConfigurationClosure();
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c42a9eac/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/PlatformTestCachePluginProvider.java
----------------------------------------------------------------------
diff --git a/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/PlatformTestCachePluginProvider.java
b/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/PlatformTestCachePluginProvider.java
new file mode 100644
index 0000000..ba04411
--- /dev/null
+++ b/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/PlatformTestCachePluginProvider.java
@@ -0,0 +1,72 @@
+/*
+ * 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.platform.plugin.cache;
+
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.plugin.CachePluginConfiguration;
+import org.apache.ignite.plugin.CachePluginProvider;
+import org.jetbrains.annotations.Nullable;
+
+import javax.cache.Cache;
+
+/**
+ * Test cache plugin provider.
+ */
+public class PlatformTestCachePluginProvider implements CachePluginProvider {
+    /** {@inheritDoc} */
+    @Override public void start() throws IgniteCheckedException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void stop(boolean cancel) {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void onIgniteStart() throws IgniteCheckedException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void onIgniteStop(boolean cancel) {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void validate() throws IgniteCheckedException {
+        // No-op.
+    }
+
+    @Override public void validateRemote(CacheConfiguration locCfg, CacheConfiguration rmtCfg,
ClusterNode rmtNode)
+        throws IgniteCheckedException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Nullable @Override public Object unwrapCacheEntry(Cache.Entry entry, Class cls) {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Nullable @Override public Object createComponent(Class cls) {
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c42a9eac/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/package-info.java
----------------------------------------------------------------------
diff --git a/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/package-info.java
b/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/package-info.java
new file mode 100644
index 0000000..e8eb9be
--- /dev/null
+++ b/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/cache/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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 description. -->
+ * Contains platform tests related classes and interfaces.
+ */
+package org.apache.ignite.platform.plugin.cache;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c42a9eac/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/package-info.java
----------------------------------------------------------------------
diff --git a/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/package-info.java
b/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/package-info.java
new file mode 100644
index 0000000..5c80677
--- /dev/null
+++ b/modules/extdata/platform/src/test/java/org/apache/ignite/platform/plugin/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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 description. -->
+ * Contains platform tests related classes and interfaces.
+ */
+package org.apache.ignite.platform.plugin;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c42a9eac/modules/extdata/platform/src/test/resources/META-INF/services/org.apache.ignite.plugin.PluginProvider
----------------------------------------------------------------------
diff --git a/modules/extdata/platform/src/test/resources/META-INF/services/org.apache.ignite.plugin.PluginProvider
b/modules/extdata/platform/src/test/resources/META-INF/services/org.apache.ignite.plugin.PluginProvider
new file mode 100644
index 0000000..30d00ae
--- /dev/null
+++ b/modules/extdata/platform/src/test/resources/META-INF/services/org.apache.ignite.plugin.PluginProvider
@@ -0,0 +1 @@
+org.apache.ignite.platform.plugin.PlatformTestPluginProvider

http://git-wip-us.apache.org/repos/asf/ignite/blob/c42a9eac/modules/extdata/platform/src/test/resources/META-INF/services/org.apache.ignite.plugin.platform.PlatformCachePluginConfigurationClosureFactory
----------------------------------------------------------------------
diff --git a/modules/extdata/platform/src/test/resources/META-INF/services/org.apache.ignite.plugin.platform.PlatformCachePluginConfigurationClosureFactory
b/modules/extdata/platform/src/test/resources/META-INF/services/org.apache.ignite.plugin.platform.PlatformCachePluginConfigurationClosureFactory
new file mode 100644
index 0000000..a99b3b9
--- /dev/null
+++ b/modules/extdata/platform/src/test/resources/META-INF/services/org.apache.ignite.plugin.platform.PlatformCachePluginConfigurationClosureFactory
@@ -0,0 +1 @@
+org.apache.ignite.platform.plugin.cache.PlatformTestCachePluginConfigurationClosureFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c42a9eac/modules/extdata/platform/src/test/resources/META-INF/services/org.apache.ignite.plugin.platform.PlatformPluginConfigurationClosureFactory
----------------------------------------------------------------------
diff --git a/modules/extdata/platform/src/test/resources/META-INF/services/org.apache.ignite.plugin.platform.PlatformPluginConfigurationClosureFactory
b/modules/extdata/platform/src/test/resources/META-INF/services/org.apache.ignite.plugin.platform.PlatformPluginConfigurationClosureFactory
new file mode 100644
index 0000000..ef79fbe
--- /dev/null
+++ b/modules/extdata/platform/src/test/resources/META-INF/services/org.apache.ignite.plugin.platform.PlatformPluginConfigurationClosureFactory
@@ -0,0 +1 @@
+org.apache.ignite.platform.plugin.PlatformTestPluginConfigurationClosureFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c42a9eac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/Classpath.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/Classpath.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/Classpath.cs
index 6c4040b..2065e41 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/Classpath.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/Classpath.cs
@@ -81,6 +81,7 @@ namespace Apache.Ignite.Core.Impl.Common
             {
                 AppendTestClasses(ggHome + "\\examples", cpStr);
                 AppendTestClasses(ggHome + "\\modules", cpStr);
+                AppendTestClasses(ggHome + "\\modules\\extdata\\platform", cpStr);
             }
 
             string ggLibs = ggHome + "\\libs";

http://git-wip-us.apache.org/repos/asf/ignite/blob/c42a9eac/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a456da4..a57c7de 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,6 +54,7 @@
         <module>modules/hadoop</module>
         <module>modules/extdata/p2p</module>
         <module>modules/extdata/uri</module>
+        <module>modules/extdata/platform</module>
         <module>modules/clients</module>
         <module>modules/spring</module>
         <module>modules/spring-data</module>


Mime
View raw message