Package io.tarantool.driver.mappers
Class SingleValueResultMapperFactory<T>
- java.lang.Object
-
- io.tarantool.driver.mappers.AbstractResultMapperFactory<R,CallResultMapper<T,R>>
-
- io.tarantool.driver.mappers.TarantoolCallResultMapperFactory<T,SingleValueCallResult<T>>
-
- io.tarantool.driver.mappers.SingleValueResultMapperFactory<T>
-
- Direct Known Subclasses:
SingleValueTarantoolResultMapperFactory
public class SingleValueResultMapperFactory<T> extends TarantoolCallResultMapperFactory<T,SingleValueCallResult<T>>
Factory forCallResultMapper
instances used for handling Lua call results resulting in two possible values -- result and error
-
-
Constructor Summary
Constructors Constructor Description SingleValueResultMapperFactory()
Basic constructorSingleValueResultMapperFactory(MessagePackMapper messagePackMapper)
Basic constructor with mapper
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CallResultMapper<T,SingleValueCallResult<T>>
withSingleValueResultConverter(ValueConverter<org.msgpack.value.Value,T> valueConverter)
Get result mapper for the Lua function call with single resultCallResultMapper<T,SingleValueCallResult<T>>
withSingleValueResultConverter(ValueConverter<org.msgpack.value.Value,T> valueConverter, Class<? extends SingleValueCallResult<T>> resultClass)
Get result mapper for the Lua function call with single resultCallResultMapper<T,SingleValueCallResult<T>>
withSingleValueResultConverter(MessagePackValueMapper valueMapper, ValueConverter<org.msgpack.value.Value,T> valueConverter)
Get result mapper for the Lua function call with single resultCallResultMapper<T,SingleValueCallResult<T>>
withSingleValueResultConverter(MessagePackValueMapper valueMapper, ValueConverter<org.msgpack.value.Value,T> valueConverter, Class<? extends SingleValueCallResult<T>> resultClass)
Get result mapper for the Lua function call with single result-
Methods inherited from class io.tarantool.driver.mappers.TarantoolCallResultMapperFactory
createMapper
-
Methods inherited from class io.tarantool.driver.mappers.AbstractResultMapperFactory
withConverter, withConverter
-
-
-
-
Constructor Detail
-
SingleValueResultMapperFactory
public SingleValueResultMapperFactory()
Basic constructor
-
SingleValueResultMapperFactory
public SingleValueResultMapperFactory(MessagePackMapper messagePackMapper)
Basic constructor with mapper- Parameters:
messagePackMapper
- mapper for MessagePack entities in tuple fields to Java objects
-
-
Method Detail
-
withSingleValueResultConverter
public CallResultMapper<T,SingleValueCallResult<T>> withSingleValueResultConverter(MessagePackValueMapper valueMapper, ValueConverter<org.msgpack.value.Value,T> valueConverter)
Get result mapper for the Lua function call with single result- Parameters:
valueMapper
- MessagePack-to-object mapper for result contentsvalueConverter
- the result content converter- Returns:
- call result mapper
-
withSingleValueResultConverter
public CallResultMapper<T,SingleValueCallResult<T>> withSingleValueResultConverter(ValueConverter<org.msgpack.value.Value,T> valueConverter)
Get result mapper for the Lua function call with single result- Parameters:
valueConverter
- the result content converter- Returns:
- call result mapper
-
withSingleValueResultConverter
public CallResultMapper<T,SingleValueCallResult<T>> withSingleValueResultConverter(MessagePackValueMapper valueMapper, ValueConverter<org.msgpack.value.Value,T> valueConverter, Class<? extends SingleValueCallResult<T>> resultClass)
Get result mapper for the Lua function call with single result- Parameters:
valueMapper
- MessagePack-to-object mapper for result contentsvalueConverter
- the result content converterresultClass
- full result type class- Returns:
- call result mapper
-
withSingleValueResultConverter
public CallResultMapper<T,SingleValueCallResult<T>> withSingleValueResultConverter(ValueConverter<org.msgpack.value.Value,T> valueConverter, Class<? extends SingleValueCallResult<T>> resultClass)
Get result mapper for the Lua function call with single result- Parameters:
valueConverter
- the result content converterresultClass
- full result type class- Returns:
- call result mapper
-
-