All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.tarantool.driver.mappers.converters.ConverterWrapper Maven / Gradle / Ivy

Go to download

Tarantool Cartridge driver for Tarantool versions 1.10+ based on Netty framework

There is a newer version: 0.14.0
Show newest version
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