nizhikov commented on a change in pull request #8909:
URL: https://github.com/apache/ignite/pull/8909#discussion_r636236986



##########
File path: modules/core/src/main/java/org/apache/ignite/cdc/ChangeEvent.java
##########
@@ -0,0 +1,65 @@
+/*
+ * 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.cdc;
+
+import java.io.Serializable;
+import org.apache.ignite.internal.cdc.IgniteCDC;
+import org.apache.ignite.lang.IgniteExperimental;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Event of single entry change.
+ * Instance presents new value of modified entry.
+ *
+ * @see IgniteCDC
+ * @see CaptureDataChangeConsumer
+ */
+@IgniteExperimental
+public interface ChangeEvent extends Serializable {
+    /**
+     * @return Key for the changed entry.
+     */
+    public Object key();
+
+    /**
+     * @return Value for the changed entry or {@code null} in case of entry 
removal.
+     */
+    @Nullable public Object value();
+
+    /**
+     * @return {@code True} if event fired on primary node for partition 
containing this entry.
+     * @see <a 
href="https://ignite.apache.org/docs/latest/configuring-caches/configuring-backups#configuring-partition-backups";>Configuring
 partition backups.</a>
+     */
+    public boolean primary();
+
+    /**
+     * @return Partition number.
+     */
+    public int partition();
+
+    /**
+     * @return Order of the update operation.
+     */
+    public ChangeEventOrder order();
+
+    /**
+     * @return Cache ID.
+     * @see org.apache.ignite.internal.util.typedef.internal.CU#cacheId(String)
+     */
+    public int cacheId();

Review comment:
       > should we provide ref to the cache configuration instead?
   
   Why do we want to do so?
   
   I suggest that CDC implementation knows what caches it wants to process and 
`cacheId` value available from system views and monitoring so it will be 
sufficient.
   




-- 
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:
[email protected]


Reply via email to