io.tarantool.driver.core.TarantoolResultFactory 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.core;
import io.tarantool.driver.api.metadata.TarantoolSpaceMetadata;
import io.tarantool.driver.mappers.converters.ValueConverter;
import io.tarantool.driver.mappers.converters.value.ArrayValueToTarantoolTupleConverter;
import org.msgpack.value.ArrayValue;
import org.msgpack.value.Value;
/**
* Singleton Factory implementation to provide instance of TarantoolResultImpl objects.
*
* @author Rishal Dev Singh
*/
public class TarantoolResultFactory {
private static final TarantoolResultFactory INSTANCE = new TarantoolResultFactory();
public static TarantoolResultFactory getInstance() {
return INSTANCE;
}
public TarantoolResultImpl createTarantoolResultImpl(ArrayValue value,
ValueConverter valueConverter) {
return new TarantoolResultImpl<>(value, valueConverter);
}
public TarantoolTupleResultImpl createTarantoolTupleResultImpl(Value value,
ArrayValueToTarantoolTupleConverter tupleConverter) {
return new TarantoolTupleResultImpl(value, tupleConverter);
}
public TarantoolTupleResultImpl createTarantoolTupleResultImpl(ArrayValue rawTuples,
TarantoolSpaceMetadata metadata,
ArrayValueToTarantoolTupleConverter tupleConverter) {
return new TarantoolTupleResultImpl(rawTuples, metadata, tupleConverter);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy