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

io.tarantool.driver.mappers.factories.TarantoolCallResultMapperFactory 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.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 valueConverter,
        Class resultClass) {
        return new CallResultMapper<>(valueMapper, valueConverter, resultClass);
    }

    @Override
    protected CallResultMapper createMapper(
        MessagePackValueMapper valueMapper,
        List> converters, Class resultClass) {
        return new CallResultMapper<>(valueMapper, converters, resultClass);
    }

    @Override
    protected CallResultMapper createMapper(
        MessagePackValueMapper valueMapper, ValueType valueType,
        ValueConverter 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