Class GapAwareTrackingTokenConverter

java.lang.Object
com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
com.thoughtworks.xstream.converters.collections.CollectionConverter
org.axonframework.serialization.GapAwareTrackingTokenConverter
All Implemented Interfaces:
com.thoughtworks.xstream.converters.Converter, com.thoughtworks.xstream.converters.ConverterMatcher

public final class GapAwareTrackingTokenConverter extends com.thoughtworks.xstream.converters.collections.CollectionConverter
Dedicated CollectionConverter implementation to de-/serializer the GapAwareTrackingToken and org.axonframework.eventsourcing.eventstore.GapAwareTrackingToken.

Necessary due to the ConcurrentSkipListSet used within the GapAwareTrackingToken, as XStream is incapable to marshall / unmarshall these Collections from the java.util.concurrent package. In pre-JDK16 times, XStream would use the ReflectionConverter for this.

Since:
4.7.0
Author:
Steven van Beelen
  • Constructor Summary

    Constructors
    Constructor
    Description
    GapAwareTrackingTokenConverter(com.thoughtworks.xstream.mapper.Mapper mapper)
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    void
    marshal(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
     
    unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
     

    Methods inherited from class com.thoughtworks.xstream.converters.collections.CollectionConverter

    addCurrentElementToCollection, createCollection, populateCollection, populateCollection

    Methods inherited from class com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter

    mapper, readBareItem, readCompleteItem, readItem, writeBareItem, writeCompleteItem, writeItem, writeNullItem

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • marshal

      public void marshal(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
      Specified by:
      marshal in interface com.thoughtworks.xstream.converters.Converter
      Overrides:
      marshal in class com.thoughtworks.xstream.converters.collections.CollectionConverter
    • unmarshal

      public Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
      Specified by:
      unmarshal in interface com.thoughtworks.xstream.converters.Converter
      Overrides:
      unmarshal in class com.thoughtworks.xstream.converters.collections.CollectionConverter
    • canConvert

      public boolean canConvert(Class type)
      Specified by:
      canConvert in interface com.thoughtworks.xstream.converters.ConverterMatcher
      Overrides:
      canConvert in class com.thoughtworks.xstream.converters.collections.CollectionConverter