Description
The case is: we want to create a copy of the default mapper and add some custom converters there. But we don't want to affect all existing converter stack. For example - I want to create a method that converts all Integers to Strings for some specific space..
We can't reuse a custom MessagePackMapper
right now.
tarantoolClient.getConfig().getMessagePackMapper().copy();
Deepcopy is not used here, so copying does not make sense. It only copies the surface layer:
if there was an entry in tarantoolClient.getConfig().getMessagePackMapper()
in Map<String, List<ValueConverter<? extends Value, ?>>> valueConverters;
with the key org.msgpack.value.ArrayValue
, then the copied list List<ValueConverter<? extends Value, ?>
will be the same for all copied configs, and when registering a new converter for the copied config, it will appear for the original one as well.
For details see these comments' threads:
tarantool/cartridge-springdata#80 (comment)
tarantool/cartridge-springdata#80 (comment)
tarantool/cartridge-springdata#80 (comment)