io.tarantool.driver.mappers.converters.value.ArrayValueToMultiValueCallResultConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cartridge-driver Show documentation
Show all versions of cartridge-driver Show documentation
Tarantool Cartridge driver for Tarantool versions 1.10+ based on Netty framework
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