You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2020/01/24 10:01:41 UTC
[ignite] branch master updated: IGNITE-12559 Add
@IgniteExperimental annotation - Fixes #7279.
This is an automated email from the ASF dual-hosted git repository.
agoncharuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 8a1b098 IGNITE-12559 Add @IgniteExperimental annotation - Fixes #7279.
8a1b098 is described below
commit 8a1b0988c34291da77345654c5266f419414093e
Author: Alexey Goncharuk <al...@gmail.com>
AuthorDate: Fri Jan 24 13:00:31 2020 +0300
IGNITE-12559 Add @IgniteExperimental annotation - Fixes #7279.
Signed-off-by: Alexey Goncharuk <al...@gmail.com>
---
.../main/java/org/apache/ignite/IgniteCache.java | 4 +++
.../events/CacheConsistencyViolationEvent.java | 4 +++
.../org/apache/ignite/lang/IgniteExperimental.java | 37 ++++++++++++++++++++++
.../Apache.Ignite.Core/Apache.Ignite.Core.csproj | 1 +
.../Common/IgniteExperimentalAttribute.cs | 36 +++++++++++++++++++++
5 files changed, 82 insertions(+)
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 002f2c2..0e59a78 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -61,6 +61,7 @@ import org.apache.ignite.lang.IgniteAsyncSupported;
import org.apache.ignite.lang.IgniteBiInClosure;
import org.apache.ignite.lang.IgniteBiPredicate;
import org.apache.ignite.lang.IgniteClosure;
+import org.apache.ignite.lang.IgniteExperimental;
import org.apache.ignite.lang.IgniteFuture;
import org.apache.ignite.mxbean.CacheMetricsMXBean;
import org.apache.ignite.transactions.TransactionConcurrency;
@@ -139,6 +140,8 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
public IgniteCache<K, V> withPartitionRecover();
/**
+ * <b>This is an experimental API.</b>
+ * <p>
* Gets an instance of {@code IgniteCache} that will perform backup nodes check on each get attempt.
* <p>
* Read Repair means that each backup node will be checked to have the same entry as primary node has,
@@ -185,6 +188,7 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
* </ul>
* @return Cache with explicit consistency check on each read and repair if necessary.
*/
+ @IgniteExperimental
public IgniteCache<K, V> withReadRepair();
/**
diff --git a/modules/core/src/main/java/org/apache/ignite/events/CacheConsistencyViolationEvent.java b/modules/core/src/main/java/org/apache/ignite/events/CacheConsistencyViolationEvent.java
index 01fee82..b00be51 100644
--- a/modules/core/src/main/java/org/apache/ignite/events/CacheConsistencyViolationEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/events/CacheConsistencyViolationEvent.java
@@ -20,10 +20,13 @@ package org.apache.ignite.events;
import java.util.Map;
import java.util.UUID;
import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.lang.IgniteExperimental;
import static org.apache.ignite.events.EventType.EVT_CONSISTENCY_VIOLATION;
/**
+ * <b>This is an experimental API.</b>
+ * <p>
* Event indicates a consistency violation.
* <p>
* Grid events are used for notification about what happens within the grid. Note that by
@@ -57,6 +60,7 @@ import static org.apache.ignite.events.EventType.EVT_CONSISTENCY_VIOLATION;
*
* @see EventType#EVT_CONSISTENCY_VIOLATION
*/
+@IgniteExperimental
public class CacheConsistencyViolationEvent<K, V> extends EventAdapter {
/** Serial version UID. */
private static final long serialVersionUID = 0L;
diff --git a/modules/core/src/main/java/org/apache/ignite/lang/IgniteExperimental.java b/modules/core/src/main/java/org/apache/ignite/lang/IgniteExperimental.java
new file mode 100644
index 0000000..5134ccd
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/lang/IgniteExperimental.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.lang;
+
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PACKAGE;
+import static java.lang.annotation.ElementType.TYPE;
+
+/**
+ * This annotation marks API elements (such as interfaces, methods, annotations and whole API packages) as experimental
+ * meaning that the API is not finalized yet and may be changed or replaced in future Ignite releases.
+ * <p>
+ * Such APIs are exposed so that users can make use of a feature before the API has been stabilized. The expectation is
+ * that an API element should be "eventually" stabilized. Incompatible changes are allowed for such APIs: API may be
+ * removed, changed or stabilized in future Ignite releases (both minor and maintenance).
+ */
+@Target(value = {TYPE, METHOD, ANNOTATION_TYPE, PACKAGE})
+public @interface IgniteExperimental {
+}
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
index 1c6d93f..5f7184c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
@@ -256,6 +256,7 @@
<Compile Include="Cluster\IClusterNode.cs" />
<Compile Include="Cluster\IClusterNodeFilter.cs" />
<Compile Include="Common\IgniteException.cs" />
+ <Compile Include="Common\IgniteExperimentalAttribute.cs" />
<Compile Include="Common\IgniteFutureCancelledException.cs" />
<Compile Include="Common\IgniteGuid.cs" />
<Compile Include="Impl\Binary\Io\IBinaryStreamProcessor.cs" />
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Common/IgniteExperimentalAttribute.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Common/IgniteExperimentalAttribute.cs
new file mode 100644
index 0000000..ea82804
--- /dev/null
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Common/IgniteExperimentalAttribute.cs
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+namespace Apache.Ignite.Core.Common
+{
+ using System;
+
+ /// <summary>
+ /// This attribute marks API elements (such as interfaces and methods) as experimental
+ /// meaning that the API is not finalized yet and may be changed or replaced in future Ignite releases.
+ ///
+ /// Such APIs are exposed so that users can make use of a feature before the API has been stabilized.
+ /// The expectation is that an API element should be "eventually" stabilized. Incompatible changes are
+ /// allowed for such APIs: API may be removed, changed or stabilized in future Ignite releases
+ /// (both minor and maintenance).
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
+ public sealed class IgniteExperimentalAttribute : Attribute
+ {
+ // No-op.
+ }
+}