io.tarantool.driver.mappers.converters.value.ArrayValueToSingleValueCallResultConverter 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.SingleValueCallResult;
import io.tarantool.driver.core.SingleValueCallResultImpl;
import io.tarantool.driver.mappers.MessagePackValueMapper;
import io.tarantool.driver.mappers.converters.ValueConverter;
import org.msgpack.value.ArrayValue;
/**
* Converter of the stored function call result into a {@link SingleValueCallResult} with mapper inside
*
* @author Alexey Kuzin
* @author Artyom Dubinin
*/
public class ArrayValueToSingleValueCallResultConverter
implements ValueConverter> {
private static final long serialVersionUID = 7218783308373068532L;
private final MessagePackValueMapper valueMapper;
public ArrayValueToSingleValueCallResultConverter(MessagePackValueMapper valueMapper) {
this.valueMapper = valueMapper;
}
@Override
public SingleValueCallResult fromValue(ArrayValue value) {
return new SingleValueCallResultImpl<>(value, valueMapper);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy