chaokunyang commented on issue #1669:
URL: 
https://github.com/apache/incubator-fury/issues/1669#issuecomment-2144299591

   Hi @xiaxianggo , you can register a customized serializer for this:
   ```java
   class SeqSerializer extends AbstractCollectionSerializer {
   
     @Override
     public Collection onCollectionWrite(MemoryBuffer buffer, Object value) {
   
     }
   
     @Override
     public Object read(MemoryBuffer buffer) {
   
     }
   
     @Override
     public Collection newCollection(MemoryBuffer buffer) {
       int numElements = buffer.readVarUint32Small7();
       setNumElements(numElements);
       ArrayList arrayList = new ArrayList(numElements);
       fury.getRefResolver().reference(arrayList);
       return arrayList;
     }
   
     @Override
     public Object onCollectionRead(Collection collection) {
   
     }
   }
   ```
   
   Take 
`org.apache.fury.serializer.collection.CollectionSerializers.ArrayListSerializer`
 as an example


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to