anton-vinogradov commented on code in PR #13428:
URL: https://github.com/apache/ignite/pull/13428#discussion_r3714323357


##########
modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageResponse.java:
##########
@@ -0,0 +1,80 @@
+/*
+ * 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.internal.managers.eventstorage;
+
+import java.util.Collection;
+import java.util.Collections;
+import org.apache.ignite.events.Event;
+import org.apache.ignite.internal.Marshalled;
+import org.apache.ignite.internal.Order;
+import org.apache.ignite.internal.UseBinaryMarshaller;
+import org.apache.ignite.internal.managers.communication.ErrorMessage;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.jetbrains.annotations.Nullable;
+
+/** Events collected for a {@link GridEventStorageRequest}, or the failure 
that prevented it. */
+@UseBinaryMarshaller
+public class GridEventStorageResponse implements Message {
+    /** */
+    @Marshalled("evtsBytes")
+    Collection<Event> evts;
+
+    /** */
+    @Order(0)
+    byte[] evtsBytes;
+
+    /** */
+    @Order(1)
+    ErrorMessage errMsg;
+
+    /** */
+    public GridEventStorageResponse() {
+        // No-op.
+    }
+
+    /**
+     * @param evts Grid events.
+     * @param ex Exception occurred during processing.
+     */
+    GridEventStorageResponse(Collection<Event> evts, @Nullable Throwable ex) {
+        this.evts = evts;
+
+        if (ex != null)
+            errMsg = new ErrorMessage(ex);
+    }
+
+    /**
+     * @return Events.

Review Comment:
   Done — collapsed in both new classes, 2 in the response and 7 in the 
request, since leaving the long form next to the short one would read oddly.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to