io.tarantool.driver.mappers.factories.TarantoolResultMapperFactory 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.TarantoolResult;
import io.tarantool.driver.mappers.MessagePackValueMapper;
import io.tarantool.driver.mappers.TarantoolResultMapper;
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 TarantoolResultMapper} instances used for handling box protocol operation results returning
* {@link TarantoolResult} (array of tuples)
*
* @param target tuple type
* @author Alexey Kuzin
*/
public class TarantoolResultMapperFactory extends
AbstractResultMapperFactory, TarantoolResultMapper> {
/**
* Basic constructor
*/
public TarantoolResultMapperFactory() {
super();
}
@Override
protected TarantoolResultMapper createMapper(
MessagePackValueMapper valueMapper,
ValueType valueType,
ValueConverter extends Value, ? extends TarantoolResult> valueConverter,
Class extends TarantoolResult> resultClass) {
return new TarantoolResultMapper<>(valueMapper, valueType, valueConverter, resultClass);
}
@Override
protected TarantoolResultMapper createMapper(
MessagePackValueMapper valueMapper, ValueType valueType,
ValueConverter extends Value, ? extends TarantoolResult> valueConverter) {
return new TarantoolResultMapper<>(valueMapper, valueType, valueConverter);
}
@Override
protected TarantoolResultMapper createMapper(
MessagePackValueMapper valueMapper,
List>> converters,
Class extends TarantoolResult> resultClass) {
return new TarantoolResultMapper<>(valueMapper, converters, resultClass);
}
@Override
protected TarantoolResultMapper createMapper(
MessagePackValueMapper valueMapper,
List>> converters) {
return new TarantoolResultMapper<>(valueMapper, converters);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy