-
Type: New Feature
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Codecs, Configuration
-
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)