Class VersionedConverter<T>

java.lang.Object
org.datadog.jenkins.plugins.datadog.util.conversion.VersionedConverter<T>
Direct Known Subclasses:
BuildSpanAction.ConverterV1, BuildSpanAction.ConverterV2, DatadogLinkAction.ConverterV1, DequeueAction.ConverterV1, DequeueAction.ConverterV2, EnqueueAction.ConverterV1, EnqueueAction.ConverterV2, GitCommitAction.ConverterV1, GitCommitMetadata.ConverterV1, GitMetadata.ConverterV1, GitMetadataAction.ConverterV1, GitRepositoryAction.ConverterV1, NodeInfoAction.ConverterV1, NodeInfoAction.ConverterV2, PipelineNodeInfoAction.ConverterV1, PipelineNodeInfoAction.ConverterV2, PipelineQueueInfoAction.ConverterV1, StatusAction.ConverterV1, TraceInfoAction.ConverterV1, TraceSpan.TraceSpanContext.ConverterV1

public abstract class VersionedConverter<T> extends Object
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    VersionedConverter(int version)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    static <U> VersionedConverter<U>
     
    abstract void
    marshal(T source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
     
    protected <F> F
    readField(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, Class<F> type)
     
    abstract T
    unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
     
    protected void
    writeField(String name, Object value, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
     

    Methods inherited from class java.lang.Object

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

    • VersionedConverter

      protected VersionedConverter(int version)
  • Method Details

    • getVersion

      public int getVersion()
    • marshal

      public abstract void marshal(T source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
    • unmarshal

      public abstract T unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
    • writeField

      protected void writeField(String name, Object value, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
    • readField

      protected <F> F readField(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, Class<F> type)
    • ignoreOldData

      public static <U> VersionedConverter<U> ignoreOldData()