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
be cast.
However CodecRegistry.DEFAULT
is immutable. It implements this interface, but register(TypeCodec)
throws an UnsupportedOperationException
.
DEFAULT
Modifier and Type | Method and Description |
---|---|
default void |
register(Iterable<TypeCodec<?>> codecs)
Invokes
register(TypeCodec) for every codec in the given list. |
default void |
register(TypeCodec<?>... codecs)
Invokes
register(TypeCodec) for every codec in the given list. |
void |
register(TypeCodec<?> codec)
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)
register(TypeCodec)
for every codec in the given list.default void register(Iterable<TypeCodec<?>> codecs)
register(TypeCodec)
for every codec in the given list.Copyright © 2017–2020. All rights reserved.