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

org.redkalex.cache.redis.RedisCacheConnection Maven / Gradle / Ivy

There is a newer version: 2.7.7
Show newest version
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.redkalex.cache.redis;

import java.io.Serializable;
import java.util.concurrent.CompletableFuture;
import java.util.function.Function;
import org.redkale.net.*;
import org.redkale.net.client.*;

/** @author zhangjx */
public class RedisCacheConnection extends ClientConnection {

    public RedisCacheConnection(Client client, AsyncConnection channel) {
        super(client, channel);
    }

    @Override
    protected ClientCodec createCodec() {
        return new RedisCacheCodec(this);
    }

    protected CompletableFuture writeRequest(RedisCacheRequest request) {
        return super.writeChannel(request);
    }

    protected CompletableFuture[] writeRequest(RedisCacheRequest[] requests) {
        return super.writeChannel(requests);
    }

    protected  CompletableFuture writeRequest(
            Function respTransfer, RedisCacheRequest request) {
        return super.writeChannel(respTransfer, request);
    }

    protected  CompletableFuture[] writeRequest(
            Function respTransfer, RedisCacheRequest[] requests) {
        return super.writeChannel(respTransfer, requests);
    }

    public RedisCacheResult pollResultSet(RedisCacheRequest request) {
        RedisCacheResult rs = new RedisCacheResult();
        return rs;
    }

    protected ClientFuture pollRespFuture(Serializable requestid) {
        return super.pollRespFuture(requestid);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy