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