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

io.tarantool.driver.mappers.converters.value.ArrayValueToSingleValueCallResultSimpleConverter 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.SingleValueCallResult;
import io.tarantool.driver.core.SingleValueCallResultImpl;
import io.tarantool.driver.mappers.converters.ValueConverter;
import org.msgpack.value.ArrayValue;
import org.msgpack.value.Value;

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

    private static final long serialVersionUID = 5062622344994604532L;

    private final ValueConverter valueConverter;

    public ArrayValueToSingleValueCallResultSimpleConverter(ValueConverter valueConverter) {
        this.valueConverter = valueConverter;
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy