Add API to apply UuidRepresentation to a CodecRegistry

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Minor - P4
    • 4.5.0
    • Affects Version/s: None
    • Component/s: Codecs, Configuration
    • None
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      When a MongoClient is created from MongoClientSettings, the MongoClient applies the uuidRepresentation to the codecRegistry, using an internal API. But there are some use cases, e.g. MongoCollection#withCodecRegistry where an application might find it necessary to apply a different representation to a registry.

      The driver should an API to CodecRegistries factory class to allow this, e.g.:

          /**
           * Apply given {@link UuidRepresentation} to the given {@link CodecRegistry}.
           *
           * @param codecRegistry the code registry
           * @param uuidRepresentation the uuid representation
           */
          public static CodecRegistry withUuidRepresentation(final CodecRegistry codecRegistry, 
                         final UuidRepresentation uuidRepresentation)
      

              Assignee:
              Jeffrey Yemin
              Reporter:
              Jeffrey Yemin
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: