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

org.tarantool.TarantoolAsyncGenericConnection16Impl Maven / Gradle / Ivy

There is a newer version: 1.9.4
Show newest version
package org.tarantool;

import java.nio.channels.SocketChannel;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;

public class TarantoolAsyncGenericConnection16Impl extends TarantoolAsyncConnection16Impl implements TarantoolAsyncGenericConnection16 {
    private final Mapper mapper;

    public TarantoolAsyncGenericConnection16Impl(Mapper mapper, TarantoolSelectorWorker worker, SocketChannel channel, String username, String password, long timeout, TimeUnit unit) {
        super(worker, channel, username, password, timeout, unit);
        this.mapper = mapper;
    }

    @Override
    public  Future select(Class clz, int space, int index, Object key, int offset, int limit, int iterator) {
        return new AsyncGenericQuery(mapper, clz, super.select(space, index, key, offset, limit, iterator));
    }

    @Override
    public  Future insert(Class clz, int space, Object tuple) {
        return new AsyncGenericQuery(mapper, clz, super.insert(space, mapper.toTuple(tuple)));
    }

    @Override
    public  Future replace(Class clz, int space, Object tuple) {
        return new AsyncGenericQuery(mapper, clz, super.replace(space, mapper.toTuple(tuple)));
    }

    @Override
    public  Future update(Class clz, int space, Object key, Object... args) {
        return new AsyncGenericQuery(mapper, clz, super.update(space, key, mapper.toTuples(args)));
    }

    @Override
    public  Future delete(Class clz, int space, Object key) {
        return new AsyncGenericQuery(mapper, clz, super.delete(space, key));
    }

    @Override
    public  Future call(Class clz, String function, Object... args) {
        return new AsyncGenericQuery(mapper, clz, super.call(function, mapper.toTuples(args)));
    }

    @Override
    public  Future eval(Class clz, String expression, Object... args) {
        return new AsyncGenericQuery(mapper, clz, super.eval(expression, mapper.toTuples(args)));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy