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 DefaultMessagePackMapper
build()
Build the mapper instanceDefaultMessagePackMapper.Builder
withDefaultArrayValueConverter()
Configure the mapper with defaultMP_ARRAY
entity toList
converterDefaultMessagePackMapper.Builder
withDefaultListObjectConverter()
Configure the mapper with defaultList
toMP_ARRAY
entity converterDefaultMessagePackMapper.Builder
withDefaultMapObjectConverter()
Configure the mapper with defaultMap
toMP_MAP
entity converterDefaultMessagePackMapper.Builder
withDefaultMapValueConverter()
Configure the mapper with defaultMP_MAP
entity toMap
converter<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:MessagePackMapperBuilder
Configure the mapper with defaultMP_MAP
entity toMap
converter- Specified by:
withDefaultMapValueConverter
in interfaceMessagePackMapperBuilder
- Returns:
- builder
-
withDefaultMapObjectConverter
public DefaultMessagePackMapper.Builder withDefaultMapObjectConverter()
Description copied from interface:MessagePackMapperBuilder
Configure the mapper with defaultMap
toMP_MAP
entity converter- Specified by:
withDefaultMapObjectConverter
in interfaceMessagePackMapperBuilder
- Returns:
- builder
-
withDefaultArrayValueConverter
public DefaultMessagePackMapper.Builder withDefaultArrayValueConverter()
Description copied from interface:MessagePackMapperBuilder
Configure the mapper with defaultMP_ARRAY
entity toList
converter- Specified by:
withDefaultArrayValueConverter
in interfaceMessagePackMapperBuilder
- Returns:
- builder
-
withDefaultListObjectConverter
public DefaultMessagePackMapper.Builder withDefaultListObjectConverter()
Description copied from interface:MessagePackMapperBuilder
Configure the mapper with defaultList
toMP_ARRAY
entity converter- Specified by:
withDefaultListObjectConverter
in 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:MessagePackMapperBuilder
Configure the mapper with a specified MessagePack entity-to-object converter- Specified by:
withValueConverter
in 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:MessagePackMapperBuilder
Configure the mapper with a specified MessagePack entity-to-object converter- Specified by:
withValueConverter
in 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:MessagePackMapperBuilder
Configure the mapper with a specified MessagePack object-to-entity converter- Specified by:
withObjectConverter
in 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:MessagePackMapperBuilder
Configure the mapper with a specified MessagePack object-to-entity converter- Specified by:
withObjectConverter
in 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:MessagePackMapperBuilder
Configure the mapper with a specified MessagePack object-to-entity converter- Specified by:
withObjectConverter
in 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:MessagePackMapperBuilder
Build the mapper instance- Specified by:
build
in interfaceMessagePackMapperBuilder
- Returns:
- a new mapper instance
-
-