All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.tarantool.driver.mappers.factories.TarantoolResultMapperFactory Maven / Gradle / Ivy

Go to download

Tarantool Cartridge driver for Tarantool versions 1.10+ based on Netty framework

There is a newer version: 0.14.0
Show newest version
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> valueConverter,
        Class> resultClass) {
        return new TarantoolResultMapper<>(valueMapper, valueType, valueConverter, resultClass);
    }

    @Override
    protected TarantoolResultMapper createMapper(
        MessagePackValueMapper valueMapper, ValueType valueType,
        ValueConverter> valueConverter) {
        return new TarantoolResultMapper<>(valueMapper, valueType, valueConverter);
    }

    @Override
    protected TarantoolResultMapper createMapper(
        MessagePackValueMapper valueMapper,
        List>> converters,
        Class> 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