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 2021/12/27 08:30:52 UTC

[GitHub] [ignite-3] rpuch opened a new pull request #526: IGNITE-16185 Improve the interface of UserObjectMarshaller

rpuch opened a new pull request #526:
URL: https://github.com/apache/ignite-3/pull/526


   https://issues.apache.org/jira/browse/IGNITE-16185
   
   1. Now unmarshal() method receives a registry of remote descriptors
   2. It builds a context from them
   3. The context is being passed through whole unmarshalling process (this caused most of the changes)
   4. Serialization special methods are now cached in descriptors themselves, so no lifetime problem occurs anymore between local descirptors (that live forever) and remote descriptors (that are discarded when their session is closed).


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-3] SammyVimes commented on a change in pull request #526: IGNITE-16185 Improve the interface of UserObjectMarshaller

Posted by GitBox <gi...@apache.org>.
SammyVimes commented on a change in pull request #526:
URL: https://github.com/apache/ignite-3/pull/526#discussion_r775453501



##########
File path: modules/network/src/main/java/org/apache/ignite/internal/network/serialization/ClassDescriptor.java
##########
@@ -211,6 +215,37 @@ public boolean supportsWriteReplace() {
         return (isSerializable() || isExternalizable()) && hasWriteReplace();
     }
 
+    /**
+     * Applies writeReplace() method.
+     *
+     * @param object     object to which to apply
+     * @return writeReplace() result
+     * @throws SpecialMethodInvocationException if writeReplace() invocation fails
+     */
+    public Object applyWriteReplace(Object object) throws SpecialMethodInvocationException {

Review comment:
       Looks kinda strange that descriptor applies methods, doesn't it?




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-3] SammyVimes closed pull request #526: IGNITE-16185 Improve the interface of UserObjectMarshaller

Posted by GitBox <gi...@apache.org>.
SammyVimes closed pull request #526:
URL: https://github.com/apache/ignite-3/pull/526


   


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-3] SammyVimes commented on pull request #526: IGNITE-16185 Improve the interface of UserObjectMarshaller

Posted by GitBox <gi...@apache.org>.
SammyVimes commented on pull request #526:
URL: https://github.com/apache/ignite-3/pull/526#issuecomment-1001625007


   Merged to the main branch https://github.com/apache/ignite-3/commit/82d2e23096571bc640677fb1225fb72955965530


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-3] rpuch commented on a change in pull request #526: IGNITE-16185 Improve the interface of UserObjectMarshaller

Posted by GitBox <gi...@apache.org>.
rpuch commented on a change in pull request #526:
URL: https://github.com/apache/ignite-3/pull/526#discussion_r775516228



##########
File path: modules/network/src/main/java/org/apache/ignite/internal/network/serialization/ClassDescriptor.java
##########
@@ -211,6 +215,37 @@ public boolean supportsWriteReplace() {
         return (isSerializable() || isExternalizable()) && hasWriteReplace();
     }
 
+    /**
+     * Applies writeReplace() method.
+     *
+     * @param object     object to which to apply
+     * @return writeReplace() result
+     * @throws SpecialMethodInvocationException if writeReplace() invocation fails
+     */
+    public Object applyWriteReplace(Object object) throws SpecialMethodInvocationException {

Review comment:
       Moved this functionality out of `ClassDescriptor`; instead, `ClassDescriptor` returns an instance of `SpecialSerializationMethods` that can be used to actually apply the methods.




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-3] rpuch commented on pull request #526: IGNITE-16185 Improve the interface of UserObjectMarshaller

Posted by GitBox <gi...@apache.org>.
rpuch commented on pull request #526:
URL: https://github.com/apache/ignite-3/pull/526#issuecomment-1001647394


   Thanks for the review


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org