public class FeatureSeThriftClientAsync extends java.lang.Object
FeatureSe
接口的异步RPC实现(线程安全)FeatureSe
接口方法到delegate()
指定的实例RuntimeException
异常被封装到ServiceRuntimeException
中抛出FeatureSeThriftClientAsync thriftInstance = ClientFactory .builder() .setHostAndPort("127.0.0.1",26413) .build(FeatureSe.class, FeatureSeThriftClientAsync.class);计算机生成代码(generated by automated tools ThriftServiceDecoratorGenerator @author guyadong)
Modifier and Type | Class and Description |
---|---|
static class |
FeatureSeThriftClientAsync.DefaultCallback<V>
默认的
FutureCallback 实现 |
Constructor and Description |
---|
FeatureSeThriftClientAsync(net.gdface.thrift.ClientFactory factory) |
FeatureSeThriftClientAsync(com.google.common.net.HostAndPort hostAndPort) |
FeatureSeThriftClientAsync(java.lang.String host,
int port) |
Modifier and Type | Method and Description |
---|---|
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
addFeature(byte[] featureId,
byte[] feature,
long appid)
|
void |
addFeature(byte[] featureId,
byte[] feature,
long appid,
com.google.common.util.concurrent.FutureCallback<java.lang.Boolean> callback) |
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
addFeature(byte[] featureId,
byte[] feature,
java.lang.String imgMD5)
|
void |
addFeature(byte[] featureId,
byte[] feature,
java.lang.String imgMD5,
com.google.common.util.concurrent.FutureCallback<java.lang.Boolean> callback) |
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
clearAll()
see also
FeatureSe.clearAll() |
void |
clearAll(com.google.common.util.concurrent.FutureCallback<java.lang.Void> callback) |
protected FeatureSe.Async |
delegate() |
net.gdface.thrift.ClientFactory |
getFactory() |
com.google.common.util.concurrent.ListenableFuture<CodeBean> |
getFeature(byte[] featureId)
see also
FeatureSe.getFeature(byte[]) |
void |
getFeature(byte[] featureId,
com.google.common.util.concurrent.FutureCallback<CodeBean> callback) |
com.google.common.util.concurrent.ListenableFuture<CodeBean> |
getFeatureByHex(java.lang.String featureId)
|
void |
getFeatureByHex(java.lang.String featureId,
com.google.common.util.concurrent.FutureCallback<CodeBean> callback) |
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
removeFeature(byte[] featureId)
see also
FeatureSe.removeFeature(byte[]) |
void |
removeFeature(byte[] featureId,
com.google.common.util.concurrent.FutureCallback<java.lang.Boolean> callback) |
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
removeFeatureByHex(java.lang.String featureId)
|
void |
removeFeatureByHex(java.lang.String featureId,
com.google.common.util.concurrent.FutureCallback<java.lang.Boolean> callback) |
com.google.common.util.concurrent.ListenableFuture<CodeBean[]> |
searchCode(byte[] code,
double sim,
int rows)
|
void |
searchCode(byte[] code,
double sim,
int rows,
com.google.common.util.concurrent.FutureCallback<CodeBean[]> callback) |
com.google.common.util.concurrent.ListenableFuture<java.lang.Integer> |
size()
see also
FeatureSe.size() |
void |
size(com.google.common.util.concurrent.FutureCallback<java.lang.Integer> callback) |
boolean |
testConnect()
test if connectable for RPC service
|
java.lang.String |
toString() |
public FeatureSeThriftClientAsync(net.gdface.thrift.ClientFactory factory)
public FeatureSeThriftClientAsync(java.lang.String host, int port)
host
- RPC service hostport
- RPC service portpublic FeatureSeThriftClientAsync(com.google.common.net.HostAndPort hostAndPort)
hostAndPort
- RPC service host and portpublic net.gdface.thrift.ClientFactory getFactory()
public boolean testConnect()
true
if connectable ,otherwise false
protected FeatureSe.Async delegate()
FeatureSe.Async
实例public java.lang.String toString()
toString
in class java.lang.Object
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> addFeature(byte[] featureId, byte[] feature, java.lang.String imgMD5)
public void addFeature(byte[] featureId, byte[] feature, java.lang.String imgMD5, com.google.common.util.concurrent.FutureCallback<java.lang.Boolean> callback)
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> addFeature(byte[] featureId, byte[] feature, long appid)
public void addFeature(byte[] featureId, byte[] feature, long appid, com.google.common.util.concurrent.FutureCallback<java.lang.Boolean> callback)
public com.google.common.util.concurrent.ListenableFuture<java.lang.Void> clearAll()
FeatureSe.clearAll()
public void clearAll(com.google.common.util.concurrent.FutureCallback<java.lang.Void> callback)
public com.google.common.util.concurrent.ListenableFuture<CodeBean> getFeature(byte[] featureId)
FeatureSe.getFeature(byte[])
public void getFeature(byte[] featureId, com.google.common.util.concurrent.FutureCallback<CodeBean> callback)
public com.google.common.util.concurrent.ListenableFuture<CodeBean> getFeatureByHex(java.lang.String featureId)
public void getFeatureByHex(java.lang.String featureId, com.google.common.util.concurrent.FutureCallback<CodeBean> callback)
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> removeFeature(byte[] featureId)
FeatureSe.removeFeature(byte[])
public void removeFeature(byte[] featureId, com.google.common.util.concurrent.FutureCallback<java.lang.Boolean> callback)
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> removeFeatureByHex(java.lang.String featureId)
public void removeFeatureByHex(java.lang.String featureId, com.google.common.util.concurrent.FutureCallback<java.lang.Boolean> callback)
public com.google.common.util.concurrent.ListenableFuture<CodeBean[]> searchCode(byte[] code, double sim, int rows)
public void searchCode(byte[] code, double sim, int rows, com.google.common.util.concurrent.FutureCallback<CodeBean[]> callback)
public com.google.common.util.concurrent.ListenableFuture<java.lang.Integer> size()
FeatureSe.size()
public void size(com.google.common.util.concurrent.FutureCallback<java.lang.Integer> callback)
Copyright © 2020. All rights reserved.