public interface MutableCodecRegistry extends CodecRegistry
This interface only exists to preserve backward compatibility. In practice, the default
CodecRegistry implementation returned by the driver implements this interface, so it can safely
CodecRegistry.DEFAULT is immutable. It implements this interface, but
register(TypeCodec) throws an
|Modifier and Type||Method and Description|
Adds the given codec to the registry.
void register(TypeCodec<?> codec)
This method will log a warning and ignore the codec if it collides with one already present in the registry. Note that the driver's built-in implementation uses internal synchronization to guarantee that two threads cannot register colliding codecs concurrently; registration is not expected to happen in a very concurrent manner, so this should not pose a performance issue.
default void register(TypeCodec<?>... codecs)
Copyright © 2017–2023. All rights reserved.