io.tarantool.driver.mappers.converters.ConverterWrapper 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 java.io.Serializable;
/**
* Base class for the internal logic of search converters.
* It is needed for faster possibility of obtaining a target type of converter.
* Target type is the second type parameter in {@link ValueConverter} or {@link ObjectConverter}.
*
* @param the converter that returns an instance of this target type from an instance of input type
* @author Artyom Dubinin
*/
public class ConverterWrapper implements Serializable {
private static final long serialVersionUID = 20220501L;
private final C converter;
private final Class> targetClass;
public ConverterWrapper(C converter, Class> targetClass) {
this.converter = converter;
this.targetClass = targetClass;
}
public C getConverter() {
return converter;
}
public Class> getTargetClass() {
return targetClass;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy