com.lowdad.thrift.client.ThriftClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rpc-client Show documentation
Show all versions of rpc-client Show documentation
RPC client for k8s services
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);
}