You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/02/12 15:41:19 UTC

[GitHub] [ignite] agura commented on a change in pull request #7383: IGNITE-12638 DMS classes are IgniteDataTransferObjects now.

agura commented on a change in pull request #7383: IGNITE-12638 DMS classes are IgniteDataTransferObjects now.
URL: https://github.com/apache/ignite/pull/7383#discussion_r378330389
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/metastorage/persistence/DistributedMetaStorageHistoryItem.java
 ##########
 @@ -68,6 +78,31 @@ public long estimateSize() {
         return size;
     }
 
+    /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        out.writeInt(keys.length);
+
+        for (int i = 0; i < keys.length; i++) {
+            U.writeString(out, keys[i]);
+
+            U.writeByteArray(out, valBytesArray[i]);
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void readExternalData(byte protoVer, ObjectInput in) throws IOException {
+        int len = in.readInt();
+
+        keys = new String[len];
 
 Review comment:
   Do we really need empty arrays in case if `len == 0`?

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