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

io.tarantool.driver.mappers.converters.value.ArrayValueToMultiValueCallResultConverter 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.converters.value;

import io.tarantool.driver.api.MultiValueCallResult;
import io.tarantool.driver.core.MultiValueCallResultImpl;
import io.tarantool.driver.mappers.MessagePackValueMapper;
import io.tarantool.driver.mappers.converters.ValueConverter;
import org.msgpack.value.ArrayValue;

import java.util.List;

/**
 * Converter of the stored function call result into a {@link MultiValueCallResult} with mapper inside
 *
 * @author Alexey Kuzin
 * @author Artyom Dubinin
 */
public class ArrayValueToMultiValueCallResultConverter>
    implements ValueConverter> {

    private static final long serialVersionUID = 20200708L;

    private final MessagePackValueMapper valueMapper;

    /**
     * Basic constructor
     *
     * @param valueMapper converter of multi-return result items to list
     */
    public ArrayValueToMultiValueCallResultConverter(MessagePackValueMapper valueMapper) {
        this.valueMapper = valueMapper;
    }

    @Override
    public MultiValueCallResult fromValue(ArrayValue value) {
        return new MultiValueCallResultImpl<>(value, valueMapper);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy