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

io.tarantool.driver.mappers.converters.value.ArrayValueToMultiValueCallResultSimpleConverter 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.converters.ValueConverter;
import org.msgpack.value.ArrayValue;

import java.util.List;

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

    private static final long serialVersionUID = -5298829576218240572L;

    private final ValueConverter valueConverter;

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy