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

com.lowdad.thrift.client.ThriftClient Maven / Gradle / Ivy

The newest version!
package com.lowdad.thrift.client;

import com.lowdad.thrift.client.func.ThriftCallFunc;
import com.lowdad.thrift.client.func.ThriftExecFunc;
import org.apache.thrift.TServiceClient;

import java.util.concurrent.Future;

/**
 * @author lowdad
 */
public interface ThriftClient {

    /**
     * sync call with return value
     * @param tcall thrift rpc client call
     * @param  return type
     * @return
     */
     TRET call(ThriftCallFunc tcall);

    /**
     * sync call without return value
     * @param texec thrift rpc client
     */
    void exec(ThriftExecFunc texec);

    /**
     * async call with return value
     * @param tcall thrift rpc client call
     * @param 
     * @return
     */
     Future asyncCall(ThriftCallFunc tcall);


    /**
     * asnyc call without return value
     * @param texec thrift rpc client call
     */
     Future asyncExec(ThriftExecFunc texec);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy