io.tarantool.driver.mappers.factories.TarantoolCallResultMapperFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cartridge-driver Show documentation
Show all versions of cartridge-driver Show documentation
Tarantool Cartridge driver for Tarantool versions 1.10+ based on Netty framework
package io.tarantool.driver.mappers.factories;
import io.tarantool.driver.api.CallResult;
import io.tarantool.driver.mappers.CallResultMapper;
import io.tarantool.driver.mappers.MessagePackValueMapper;
import io.tarantool.driver.mappers.converters.ValueConverter;
import io.tarantool.driver.mappers.converters.ValueConverterWithInputTypeWrapper;
import org.msgpack.value.Value;
import org.msgpack.value.ValueType;
import java.util.List;
/**
* Factory for {@link CallResultMapper} instances used for calling API functions on Tarantool instance
*
* @param target result content type
* @param target result type
* @author Alexey Kuzin
*/
public class TarantoolCallResultMapperFactory> extends
AbstractResultMapperFactory> {
/**
* Basic constructor
*/
public TarantoolCallResultMapperFactory() {
super();
}
@Override
protected CallResultMapper createMapper(
MessagePackValueMapper valueMapper, ValueType valueType,
ValueConverter extends Value, ? extends R> valueConverter,
Class extends R> resultClass) {
return new CallResultMapper<>(valueMapper, valueConverter, resultClass);
}
@Override
protected CallResultMapper createMapper(
MessagePackValueMapper valueMapper,
List> converters, Class extends R> resultClass) {
return new CallResultMapper<>(valueMapper, converters, resultClass);
}
@Override
protected CallResultMapper createMapper(
MessagePackValueMapper valueMapper, ValueType valueType,
ValueConverter extends Value, ? extends R> valueConverter) {
return new CallResultMapper<>(valueMapper, valueType, valueConverter);
}
@Override
protected CallResultMapper createMapper(
MessagePackValueMapper valueMapper, List> converters) {
return new CallResultMapper<>(valueMapper, converters);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy