001package net.gdface.sdk.fse.thrift.client; 002 003import com.facebook.swift.codec.*; 004import com.facebook.swift.codec.ThriftField.Requiredness; 005import com.facebook.swift.service.*; 006import com.google.common.util.concurrent.ListenableFuture; 007import java.io.*; 008import java.util.*; 009 010@ThriftService("FeatureSe") 011public interface FeatureSe 012{ 013 @ThriftService("FeatureSe") 014 public interface Async 015 { 016 @ThriftMethod(value = "addFeatureToFse", 017 exception = { 018 @ThriftException(type=ServiceRuntimeException.class, id=1) 019 }) 020 ListenableFuture<Boolean> addFeatureToFse( 021 @ThriftField(value=1, name="featureId", requiredness=Requiredness.OPTIONAL) final byte [] featureId, 022 @ThriftField(value=2, name="feature", requiredness=Requiredness.OPTIONAL) final byte [] feature, 023 @ThriftField(value=3, name="imgMD5", requiredness=Requiredness.OPTIONAL) final String imgMD5 024 ); 025 026 @ThriftMethod(value = "addFeatureToFseWithAppId", 027 exception = { 028 @ThriftException(type=ServiceRuntimeException.class, id=1) 029 }) 030 ListenableFuture<Boolean> addFeatureToFseWithAppId( 031 @ThriftField(value=1, name="featureId", requiredness=Requiredness.OPTIONAL) final byte [] featureId, 032 @ThriftField(value=2, name="feature", requiredness=Requiredness.OPTIONAL) final byte [] feature, 033 @ThriftField(value=3, name="appid", requiredness=Requiredness.REQUIRED) final long appid 034 ); 035 036 @ThriftMethod(value = "clearAllOfFse", 037 exception = { 038 @ThriftException(type=ServiceRuntimeException.class, id=1) 039 }) 040 ListenableFuture<Void> clearAllOfFse(); 041 042 @ThriftMethod(value = "getFeatureByHexFromFse", 043 exception = { 044 @ThriftException(type=ServiceRuntimeException.class, id=1) 045 }) 046 ListenableFuture<CodeBean> getFeatureByHexFromFse( 047 @ThriftField(value=1, name="featureId", requiredness=Requiredness.OPTIONAL) final String featureId 048 ); 049 050 @ThriftMethod(value = "getFeatureFromFse", 051 exception = { 052 @ThriftException(type=ServiceRuntimeException.class, id=1) 053 }) 054 ListenableFuture<CodeBean> getFeatureFromFse( 055 @ThriftField(value=1, name="featureId", requiredness=Requiredness.OPTIONAL) final byte [] featureId 056 ); 057 058 @ThriftMethod(value = "removeFeatureByHexFromFse", 059 exception = { 060 @ThriftException(type=ServiceRuntimeException.class, id=1) 061 }) 062 ListenableFuture<Boolean> removeFeatureByHexFromFse( 063 @ThriftField(value=1, name="featureId", requiredness=Requiredness.OPTIONAL) final String featureId 064 ); 065 066 @ThriftMethod(value = "removeFeatureFromFse", 067 exception = { 068 @ThriftException(type=ServiceRuntimeException.class, id=1) 069 }) 070 ListenableFuture<Boolean> removeFeatureFromFse( 071 @ThriftField(value=1, name="featureId", requiredness=Requiredness.OPTIONAL) final byte [] featureId 072 ); 073 074 @ThriftMethod(value = "searchCodeFromFse", 075 exception = { 076 @ThriftException(type=ServiceRuntimeException.class, id=1) 077 }) 078 ListenableFuture<List<CodeBean>> searchCodeFromFse( 079 @ThriftField(value=1, name="code", requiredness=Requiredness.OPTIONAL) final byte [] code, 080 @ThriftField(value=2, name="sim", requiredness=Requiredness.REQUIRED) final double sim, 081 @ThriftField(value=3, name="rows", requiredness=Requiredness.REQUIRED) final int rows 082 ); 083 084 @ThriftMethod(value = "sizeOfFse", 085 exception = { 086 @ThriftException(type=ServiceRuntimeException.class, id=1) 087 }) 088 ListenableFuture<Integer> sizeOfFse(); 089 } 090 @ThriftMethod(value = "addFeatureToFse", 091 exception = { 092 @ThriftException(type=ServiceRuntimeException.class, id=1) 093 }) 094 boolean addFeatureToFse( 095 @ThriftField(value=1, name="featureId", requiredness=Requiredness.OPTIONAL) final byte [] featureId, 096 @ThriftField(value=2, name="feature", requiredness=Requiredness.OPTIONAL) final byte [] feature, 097 @ThriftField(value=3, name="imgMD5", requiredness=Requiredness.OPTIONAL) final String imgMD5 098 ) throws ServiceRuntimeException; 099 100 @ThriftMethod(value = "addFeatureToFseWithAppId", 101 exception = { 102 @ThriftException(type=ServiceRuntimeException.class, id=1) 103 }) 104 boolean addFeatureToFseWithAppId( 105 @ThriftField(value=1, name="featureId", requiredness=Requiredness.OPTIONAL) final byte [] featureId, 106 @ThriftField(value=2, name="feature", requiredness=Requiredness.OPTIONAL) final byte [] feature, 107 @ThriftField(value=3, name="appid", requiredness=Requiredness.REQUIRED) final long appid 108 ) throws ServiceRuntimeException; 109 110 @ThriftMethod(value = "clearAllOfFse", 111 exception = { 112 @ThriftException(type=ServiceRuntimeException.class, id=1) 113 }) 114 void clearAllOfFse() throws ServiceRuntimeException; 115 116 @ThriftMethod(value = "getFeatureByHexFromFse", 117 exception = { 118 @ThriftException(type=ServiceRuntimeException.class, id=1) 119 }) 120 CodeBean getFeatureByHexFromFse( 121 @ThriftField(value=1, name="featureId", requiredness=Requiredness.OPTIONAL) final String featureId 122 ) throws ServiceRuntimeException; 123 124 @ThriftMethod(value = "getFeatureFromFse", 125 exception = { 126 @ThriftException(type=ServiceRuntimeException.class, id=1) 127 }) 128 CodeBean getFeatureFromFse( 129 @ThriftField(value=1, name="featureId", requiredness=Requiredness.OPTIONAL) final byte [] featureId 130 ) throws ServiceRuntimeException; 131 132 @ThriftMethod(value = "removeFeatureByHexFromFse", 133 exception = { 134 @ThriftException(type=ServiceRuntimeException.class, id=1) 135 }) 136 boolean removeFeatureByHexFromFse( 137 @ThriftField(value=1, name="featureId", requiredness=Requiredness.OPTIONAL) final String featureId 138 ) throws ServiceRuntimeException; 139 140 @ThriftMethod(value = "removeFeatureFromFse", 141 exception = { 142 @ThriftException(type=ServiceRuntimeException.class, id=1) 143 }) 144 boolean removeFeatureFromFse( 145 @ThriftField(value=1, name="featureId", requiredness=Requiredness.OPTIONAL) final byte [] featureId 146 ) throws ServiceRuntimeException; 147 148 @ThriftMethod(value = "searchCodeFromFse", 149 exception = { 150 @ThriftException(type=ServiceRuntimeException.class, id=1) 151 }) 152 List<CodeBean> searchCodeFromFse( 153 @ThriftField(value=1, name="code", requiredness=Requiredness.OPTIONAL) final byte [] code, 154 @ThriftField(value=2, name="sim", requiredness=Requiredness.REQUIRED) final double sim, 155 @ThriftField(value=3, name="rows", requiredness=Requiredness.REQUIRED) final int rows 156 ) throws ServiceRuntimeException; 157 158 @ThriftMethod(value = "sizeOfFse", 159 exception = { 160 @ThriftException(type=ServiceRuntimeException.class, id=1) 161 }) 162 int sizeOfFse() throws ServiceRuntimeException; 163}