io.tarantool.driver.mappers.converters.ObjectConverter 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;
import org.msgpack.value.Value;
/**
* Basic interface for converters from Java objects to MessagePack entities for a particular class
*
* @param the source object type
* @param the target MessagePack entity type
* @author Alexey Kuzin
*/
public interface ObjectConverter extends Converter {
/**
* Convert Java object to a MessagePack entity
*
* @param object object
* @return entity
*/
V toValue(O object);
/**
* Optional method for determining if this specific object can be converted to the specified {@link Value} type.
*
* @param object the object to be converted
* @return true, if the object csn be converted
*/
default boolean canConvertObject(O object) {
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy