Class CustomJacksonCodecRegistry

java.lang.Object
org.mongojack.JacksonCodecRegistry
org.graylog2.database.jackson.CustomJacksonCodecRegistry
All Implemented Interfaces:
org.bson.codecs.configuration.CodecProvider, org.bson.codecs.configuration.CodecRegistry

public class CustomJacksonCodecRegistry extends org.mongojack.JacksonCodecRegistry
A custom implementation of Mongojack's JacksonCodecRegistry so that we are able to register our CustomJacksonCodec.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final ConcurrentHashMap<Class<?>,org.bson.codecs.Codec<?>>
     
    protected final com.fasterxml.jackson.databind.ObjectMapper
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomJacksonCodecRegistry(com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.bson.codecs.configuration.CodecRegistry defaultCodecRegistry)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> org.bson.codecs.Codec<T>
     

    Methods inherited from class org.mongojack.JacksonCodecRegistry

    get, get, getUuidRepresentation, isDefault

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.bson.codecs.configuration.CodecProvider

    get

    Methods inherited from interface org.bson.codecs.configuration.CodecRegistry

    get
  • Field Details

    • codecCache

      protected final ConcurrentHashMap<Class<?>,org.bson.codecs.Codec<?>> codecCache
    • objectMapper

      protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper
  • Constructor Details

    • CustomJacksonCodecRegistry

      public CustomJacksonCodecRegistry(com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.bson.codecs.configuration.CodecRegistry defaultCodecRegistry)
  • Method Details

    • addCodecForClass

      public <T> org.bson.codecs.Codec<T> addCodecForClass(Class<T> clazz)
      Overrides:
      addCodecForClass in class org.mongojack.JacksonCodecRegistry