Package io.tarantool.driver.mappers
Class DefaultMessagePackMapper.Builder
- java.lang.Object
-
- io.tarantool.driver.mappers.DefaultMessagePackMapper.Builder
-
- All Implemented Interfaces:
MessagePackMapperBuilder
- Enclosing class:
- DefaultMessagePackMapper
public static class DefaultMessagePackMapper.Builder extends Object implements MessagePackMapperBuilder
Builder forDefaultMessagePackMapper
-
-
Constructor Summary
Constructors Constructor Description Builder()Basic constructor, initialized with an empty mapperBuilder(DefaultMessagePackMapper mapper)Basic constructor, initialized with the specified mapper
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultMessagePackMapperbuild()Build the mapper instanceDefaultMessagePackMapper.BuilderwithDefaultArrayValueConverter()Configure the mapper with defaultMP_ARRAYentity toListconverterDefaultMessagePackMapper.BuilderwithDefaultListObjectConverter()Configure the mapper with defaultListtoMP_ARRAYentity converterDefaultMessagePackMapper.BuilderwithDefaultMapObjectConverter()Configure the mapper with defaultMaptoMP_MAPentity converterDefaultMessagePackMapper.BuilderwithDefaultMapValueConverter()Configure the mapper with defaultMP_MAPentity toMapconverter<V extends org.msgpack.value.Value,O>
DefaultMessagePackMapper.BuilderwithObjectConverter(ObjectConverter<O,V> converter)Configure the mapper with a specified MessagePack object-to-entity converter<V extends org.msgpack.value.Value,O>
DefaultMessagePackMapper.BuilderwithObjectConverter(Class<O> objectClass, ObjectConverter<O,V> converter)Configure the mapper with a specified MessagePack object-to-entity converter<V extends org.msgpack.value.Value,O>
DefaultMessagePackMapper.BuilderwithObjectConverter(Class<O> objectClass, Class<V> valueClass, ObjectConverter<O,V> converter)Configure the mapper with a specified MessagePack object-to-entity converter<V extends org.msgpack.value.Value,O>
DefaultMessagePackMapper.BuilderwithValueConverter(org.msgpack.value.ValueType valueType, ValueConverter<V,O> converter)Configure the mapper with a specified MessagePack entity-to-object converter<V extends org.msgpack.value.Value,O>
DefaultMessagePackMapper.BuilderwithValueConverter(org.msgpack.value.ValueType valueType, Class<O> objectClass, ValueConverter<V,O> converter)Configure the mapper with a specified MessagePack entity-to-object converter
-
-
-
Constructor Detail
-
Builder
public Builder()
Basic constructor, initialized with an empty mapper
-
Builder
public Builder(DefaultMessagePackMapper mapper)
Basic constructor, initialized with the specified mapper- Parameters:
mapper- a mapper instance
-
-
Method Detail
-
withDefaultMapValueConverter
public DefaultMessagePackMapper.Builder withDefaultMapValueConverter()
Description copied from interface:MessagePackMapperBuilderConfigure the mapper with defaultMP_MAPentity toMapconverter- Specified by:
withDefaultMapValueConverterin interfaceMessagePackMapperBuilder- Returns:
- builder
-
withDefaultMapObjectConverter
public DefaultMessagePackMapper.Builder withDefaultMapObjectConverter()
Description copied from interface:MessagePackMapperBuilderConfigure the mapper with defaultMaptoMP_MAPentity converter- Specified by:
withDefaultMapObjectConverterin interfaceMessagePackMapperBuilder- Returns:
- builder
-
withDefaultArrayValueConverter
public DefaultMessagePackMapper.Builder withDefaultArrayValueConverter()
Description copied from interface:MessagePackMapperBuilderConfigure the mapper with defaultMP_ARRAYentity toListconverter- Specified by:
withDefaultArrayValueConverterin interfaceMessagePackMapperBuilder- Returns:
- builder
-
withDefaultListObjectConverter
public DefaultMessagePackMapper.Builder withDefaultListObjectConverter()
Description copied from interface:MessagePackMapperBuilderConfigure the mapper with defaultListtoMP_ARRAYentity converter- Specified by:
withDefaultListObjectConverterin interfaceMessagePackMapperBuilder- Returns:
- builder
-
withValueConverter
public <V extends org.msgpack.value.Value,O> DefaultMessagePackMapper.Builder withValueConverter(org.msgpack.value.ValueType valueType, ValueConverter<V,O> converter)
Description copied from interface:MessagePackMapperBuilderConfigure the mapper with a specified MessagePack entity-to-object converter- Specified by:
withValueConverterin interfaceMessagePackMapperBuilder- Type Parameters:
V- MessagePack's entity type that the converter accepts and/or returnsO- java object's type that the converter accepts and/or returns- Parameters:
valueType- MessagePack source typeconverter- MessagePack entity-to-object and object-to-entity converter- Returns:
- builder
- See Also:
DefaultMessagePackMapper.registerValueConverter(ValueType, ValueConverter)
-
withValueConverter
public <V extends org.msgpack.value.Value,O> DefaultMessagePackMapper.Builder withValueConverter(org.msgpack.value.ValueType valueType, Class<O> objectClass, ValueConverter<V,O> converter)
Description copied from interface:MessagePackMapperBuilderConfigure the mapper with a specified MessagePack entity-to-object converter- Specified by:
withValueConverterin interfaceMessagePackMapperBuilder- Type Parameters:
V- MessagePack's entity type that the converter accepts and/or returnsO- java object's type that the converter accepts and/or returns- Parameters:
valueType- MessagePack source typeobjectClass- target object classconverter- MessagePack entity-to-object and object-to-entity converter- Returns:
- builder
- See Also:
DefaultMessagePackMapper.registerValueConverter(ValueType, Class, ValueConverter)
-
withObjectConverter
public <V extends org.msgpack.value.Value,O> DefaultMessagePackMapper.Builder withObjectConverter(ObjectConverter<O,V> converter)
Description copied from interface:MessagePackMapperBuilderConfigure the mapper with a specified MessagePack object-to-entity converter- Specified by:
withObjectConverterin interfaceMessagePackMapperBuilder- Type Parameters:
V- MessagePack's entity type that the converter accepts and/or returnsO- java object's type that the converter accepts and/or returns- Parameters:
converter- MessagePack entity-to-object and object-to-entity converter- Returns:
- builder
-
withObjectConverter
public <V extends org.msgpack.value.Value,O> DefaultMessagePackMapper.Builder withObjectConverter(Class<O> objectClass, ObjectConverter<O,V> converter)
Description copied from interface:MessagePackMapperBuilderConfigure the mapper with a specified MessagePack object-to-entity converter- Specified by:
withObjectConverterin interfaceMessagePackMapperBuilder- Type Parameters:
V- MessagePack's entity type that the converter accepts and/or returnsO- java object's type that the converter accepts and/or returns- Parameters:
objectClass- source object classconverter- MessagePack entity-to-object and object-to-entity converter- Returns:
- builder
-
withObjectConverter
public <V extends org.msgpack.value.Value,O> DefaultMessagePackMapper.Builder withObjectConverter(Class<O> objectClass, Class<V> valueClass, ObjectConverter<O,V> converter)
Description copied from interface:MessagePackMapperBuilderConfigure the mapper with a specified MessagePack object-to-entity converter- Specified by:
withObjectConverterin interfaceMessagePackMapperBuilder- Type Parameters:
V- MessagePack entity typeO- object type- Parameters:
objectClass- source object classvalueClass- target object classconverter- MessagePack entity-to-object and object-to-entity converter- Returns:
- builder
-
build
public DefaultMessagePackMapper build()
Description copied from interface:MessagePackMapperBuilderBuild the mapper instance- Specified by:
buildin interfaceMessagePackMapperBuilder- Returns:
- a new mapper instance
-
-