ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] sk0x50 commented on a change in pull request #5656: IGNITE-10663 Read Repair
Date Wed, 10 Jul 2019 12:32:11 GMT
sk0x50 commented on a change in pull request #5656: IGNITE-10663 Read Repair
URL: https://github.com/apache/ignite/pull/5656#discussion_r302022859
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/events/CacheConsistencyViolationEvent.java
 ##########
 @@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.events;
+
+import java.util.Map;
+import java.util.UUID;
+import org.apache.ignite.cluster.ClusterNode;
+
+import static org.apache.ignite.events.EventType.EVT_CONSISTENCY_VIOLATION;
+
+/**
+ * Event indicates consistency violation detection.
+ *
+ * @see EventType#EVT_CONSISTENCY_VIOLATION
+ */
+public class CacheConsistencyViolationEvent extends EventAdapter {
+    /** Serial version UID. */
+    private static final long serialVersionUID = 0L;
+
+    /** Original distribution. */
+    Map<UUID /*Node*/, Map<Object /*Key*/, Object /*Value*/>> locEntries;
+
+    /** Fixed entries. */
+    Map<Object /*Key*/, Object /*Value*/> fixedEntries;
+
+    /**
+     *
+     */
+    public CacheConsistencyViolationEvent(
+        ClusterNode node,
+        String msg,
+        Map<UUID, Map<Object, Object>> locEntries,
+        Map<Object, Object> fixedEntries) {
+        super(node, msg, EVT_CONSISTENCY_VIOLATION);
+
+        this.locEntries = locEntries;
+        this.fixedEntries = fixedEntries;
+    }
+
+    /**
+     * Original distribution.
+     */
+    public Map<UUID, Map<Object, Object>> getEntries() {
+        return locEntries;
+    }
+
+    /**
+     * Fixed entries.
 
 Review comment:
   ```java
       /**
        * Returns a collection that contains repaired key-value pairs.
        *
        * @return Collection of repaired entries.
        */
   ```
   
   By the way, the feature is called `ReadRepair`, so I would prefer to rename this method
to `getRepairedEntrties` or `repairedEntries` for instance. What do you think?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message