public final class GapAwareTrackingTokenConverter
extends com.thoughtworks.xstream.converters.collections.CollectionConverter
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.
Constructor and Description |
---|
GapAwareTrackingTokenConverter(com.thoughtworks.xstream.mapper.Mapper mapper)
Constructs a
GapAwareTrackingTokenConverter . |
Modifier and Type | Method and Description |
---|---|
boolean |
canConvert(Class type) |
void |
marshal(Object source,
com.thoughtworks.xstream.io.HierarchicalStreamWriter writer,
com.thoughtworks.xstream.converters.MarshallingContext context) |
Object |
unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader,
com.thoughtworks.xstream.converters.UnmarshallingContext context) |
addCurrentElementToCollection, createCollection, populateCollection, populateCollection
public GapAwareTrackingTokenConverter(com.thoughtworks.xstream.mapper.Mapper mapper)
GapAwareTrackingTokenConverter
.mapper
- The mapper to be used by the constructed GapAwareTrackingTokenConverter
.public void marshal(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
marshal
in interface com.thoughtworks.xstream.converters.Converter
marshal
in class com.thoughtworks.xstream.converters.collections.CollectionConverter
public Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
unmarshal
in interface com.thoughtworks.xstream.converters.Converter
unmarshal
in class com.thoughtworks.xstream.converters.collections.CollectionConverter
public boolean canConvert(Class type)
canConvert
in interface com.thoughtworks.xstream.converters.ConverterMatcher
canConvert
in class com.thoughtworks.xstream.converters.collections.CollectionConverter
Copyright © 2010–2024. All rights reserved.