Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4461

Add API to apply UuidRepresentation to a CodecRegistry

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

      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:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: