2 * Autogenerated by Thrift Compiler (0.11.0)
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
10 #include <thrift/TDispatchProcessor.h>
11 #include <thrift/async/TConcurrentClientSyncInfo.h>
12 #include "dependency_types.h"
14 namespace jaegertracing
{ namespace thrift
{
17 #pragma warning( push )
18 #pragma warning (disable : 4250 ) //inheriting methods via dominance
23 virtual ~DependencyIf() {}
24 virtual void getDependenciesForTrace(Dependencies
& _return
, const std::string
& traceId
) = 0;
25 virtual void saveDependencies(const Dependencies
& dependencies
) = 0;
28 class DependencyIfFactory
{
30 typedef DependencyIf Handler
;
32 virtual ~DependencyIfFactory() {}
34 virtual DependencyIf
* getHandler(const ::apache::thrift::TConnectionInfo
& connInfo
) = 0;
35 virtual void releaseHandler(DependencyIf
* /* handler */) = 0;
38 class DependencyIfSingletonFactory
: virtual public DependencyIfFactory
{
40 DependencyIfSingletonFactory(const ::std::shared_ptr
<DependencyIf
>& iface
) : iface_(iface
) {}
41 virtual ~DependencyIfSingletonFactory() {}
43 virtual DependencyIf
* getHandler(const ::apache::thrift::TConnectionInfo
&) {
46 virtual void releaseHandler(DependencyIf
* /* handler */) {}
49 ::std::shared_ptr
<DependencyIf
> iface_
;
52 class DependencyNull
: virtual public DependencyIf
{
54 virtual ~DependencyNull() {}
55 void getDependenciesForTrace(Dependencies
& /* _return */, const std::string
& /* traceId */) {
58 void saveDependencies(const Dependencies
& /* dependencies */) {
64 class Dependency_getDependenciesForTrace_args
{
67 Dependency_getDependenciesForTrace_args(const Dependency_getDependenciesForTrace_args
&);
68 Dependency_getDependenciesForTrace_args
& operator=(const Dependency_getDependenciesForTrace_args
&);
69 Dependency_getDependenciesForTrace_args() : traceId() {
72 virtual ~Dependency_getDependenciesForTrace_args() throw();
75 void __set_traceId(const std::string
& val
);
77 bool operator == (const Dependency_getDependenciesForTrace_args
& rhs
) const
79 if (!(traceId
== rhs
.traceId
))
83 bool operator != (const Dependency_getDependenciesForTrace_args
&rhs
) const {
84 return !(*this == rhs
);
87 bool operator < (const Dependency_getDependenciesForTrace_args
& ) const;
89 uint32_t read(::apache::thrift::protocol::TProtocol
* iprot
);
90 uint32_t write(::apache::thrift::protocol::TProtocol
* oprot
) const;
95 class Dependency_getDependenciesForTrace_pargs
{
99 virtual ~Dependency_getDependenciesForTrace_pargs() throw();
100 const std::string
* traceId
;
102 uint32_t write(::apache::thrift::protocol::TProtocol
* oprot
) const;
106 typedef struct _Dependency_getDependenciesForTrace_result__isset
{
107 _Dependency_getDependenciesForTrace_result__isset() : success(false) {}
109 } _Dependency_getDependenciesForTrace_result__isset
;
111 class Dependency_getDependenciesForTrace_result
{
114 Dependency_getDependenciesForTrace_result(const Dependency_getDependenciesForTrace_result
&);
115 Dependency_getDependenciesForTrace_result
& operator=(const Dependency_getDependenciesForTrace_result
&);
116 Dependency_getDependenciesForTrace_result() {
119 virtual ~Dependency_getDependenciesForTrace_result() throw();
120 Dependencies success
;
122 _Dependency_getDependenciesForTrace_result__isset __isset
;
124 void __set_success(const Dependencies
& val
);
126 bool operator == (const Dependency_getDependenciesForTrace_result
& rhs
) const
128 if (!(success
== rhs
.success
))
132 bool operator != (const Dependency_getDependenciesForTrace_result
&rhs
) const {
133 return !(*this == rhs
);
136 bool operator < (const Dependency_getDependenciesForTrace_result
& ) const;
138 uint32_t read(::apache::thrift::protocol::TProtocol
* iprot
);
139 uint32_t write(::apache::thrift::protocol::TProtocol
* oprot
) const;
143 typedef struct _Dependency_getDependenciesForTrace_presult__isset
{
144 _Dependency_getDependenciesForTrace_presult__isset() : success(false) {}
146 } _Dependency_getDependenciesForTrace_presult__isset
;
148 class Dependency_getDependenciesForTrace_presult
{
152 virtual ~Dependency_getDependenciesForTrace_presult() throw();
153 Dependencies
* success
;
155 _Dependency_getDependenciesForTrace_presult__isset __isset
;
157 uint32_t read(::apache::thrift::protocol::TProtocol
* iprot
);
161 typedef struct _Dependency_saveDependencies_args__isset
{
162 _Dependency_saveDependencies_args__isset() : dependencies(false) {}
163 bool dependencies
:1;
164 } _Dependency_saveDependencies_args__isset
;
166 class Dependency_saveDependencies_args
{
169 Dependency_saveDependencies_args(const Dependency_saveDependencies_args
&);
170 Dependency_saveDependencies_args
& operator=(const Dependency_saveDependencies_args
&);
171 Dependency_saveDependencies_args() {
174 virtual ~Dependency_saveDependencies_args() throw();
175 Dependencies dependencies
;
177 _Dependency_saveDependencies_args__isset __isset
;
179 void __set_dependencies(const Dependencies
& val
);
181 bool operator == (const Dependency_saveDependencies_args
& rhs
) const
183 if (!(dependencies
== rhs
.dependencies
))
187 bool operator != (const Dependency_saveDependencies_args
&rhs
) const {
188 return !(*this == rhs
);
191 bool operator < (const Dependency_saveDependencies_args
& ) const;
193 uint32_t read(::apache::thrift::protocol::TProtocol
* iprot
);
194 uint32_t write(::apache::thrift::protocol::TProtocol
* oprot
) const;
199 class Dependency_saveDependencies_pargs
{
203 virtual ~Dependency_saveDependencies_pargs() throw();
204 const Dependencies
* dependencies
;
206 uint32_t write(::apache::thrift::protocol::TProtocol
* oprot
) const;
210 class DependencyClient
: virtual public DependencyIf
{
212 DependencyClient(std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> prot
) {
215 DependencyClient(std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> iprot
, std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> oprot
) {
216 setProtocol(iprot
,oprot
);
219 void setProtocol(std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> prot
) {
220 setProtocol(prot
,prot
);
222 void setProtocol(std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> iprot
, std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> oprot
) {
225 iprot_
= iprot
.get();
226 oprot_
= oprot
.get();
229 std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> getInputProtocol() {
232 std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> getOutputProtocol() {
235 void getDependenciesForTrace(Dependencies
& _return
, const std::string
& traceId
);
236 void send_getDependenciesForTrace(const std::string
& traceId
);
237 void recv_getDependenciesForTrace(Dependencies
& _return
);
238 void saveDependencies(const Dependencies
& dependencies
);
239 void send_saveDependencies(const Dependencies
& dependencies
);
241 std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> piprot_
;
242 std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> poprot_
;
243 ::apache::thrift::protocol::TProtocol
* iprot_
;
244 ::apache::thrift::protocol::TProtocol
* oprot_
;
247 class DependencyProcessor
: public ::apache::thrift::TDispatchProcessor
{
249 ::std::shared_ptr
<DependencyIf
> iface_
;
250 virtual bool dispatchCall(::apache::thrift::protocol::TProtocol
* iprot
, ::apache::thrift::protocol::TProtocol
* oprot
, const std::string
& fname
, int32_t seqid
, void* callContext
);
252 typedef void (DependencyProcessor::*ProcessFunction
)(int32_t, ::apache::thrift::protocol::TProtocol
*, ::apache::thrift::protocol::TProtocol
*, void*);
253 typedef std::map
<std::string
, ProcessFunction
> ProcessMap
;
254 ProcessMap processMap_
;
255 void process_getDependenciesForTrace(int32_t seqid
, ::apache::thrift::protocol::TProtocol
* iprot
, ::apache::thrift::protocol::TProtocol
* oprot
, void* callContext
);
256 void process_saveDependencies(int32_t seqid
, ::apache::thrift::protocol::TProtocol
* iprot
, ::apache::thrift::protocol::TProtocol
* oprot
, void* callContext
);
258 DependencyProcessor(::std::shared_ptr
<DependencyIf
> iface
) :
260 processMap_
["getDependenciesForTrace"] = &DependencyProcessor::process_getDependenciesForTrace
;
261 processMap_
["saveDependencies"] = &DependencyProcessor::process_saveDependencies
;
264 virtual ~DependencyProcessor() {}
267 class DependencyProcessorFactory
: public ::apache::thrift::TProcessorFactory
{
269 DependencyProcessorFactory(const ::std::shared_ptr
< DependencyIfFactory
>& handlerFactory
) :
270 handlerFactory_(handlerFactory
) {}
272 ::std::shared_ptr
< ::apache::thrift::TProcessor
> getProcessor(const ::apache::thrift::TConnectionInfo
& connInfo
);
275 ::std::shared_ptr
< DependencyIfFactory
> handlerFactory_
;
278 class DependencyMultiface
: virtual public DependencyIf
{
280 DependencyMultiface(std::vector
<std::shared_ptr
<DependencyIf
> >& ifaces
) : ifaces_(ifaces
) {
282 virtual ~DependencyMultiface() {}
284 std::vector
<std::shared_ptr
<DependencyIf
> > ifaces_
;
285 DependencyMultiface() {}
286 void add(::std::shared_ptr
<DependencyIf
> iface
) {
287 ifaces_
.push_back(iface
);
290 void getDependenciesForTrace(Dependencies
& _return
, const std::string
& traceId
) {
291 size_t sz
= ifaces_
.size();
293 for (; i
< (sz
- 1); ++i
) {
294 ifaces_
[i
]->getDependenciesForTrace(_return
, traceId
);
296 ifaces_
[i
]->getDependenciesForTrace(_return
, traceId
);
300 void saveDependencies(const Dependencies
& dependencies
) {
301 size_t sz
= ifaces_
.size();
303 for (; i
< (sz
- 1); ++i
) {
304 ifaces_
[i
]->saveDependencies(dependencies
);
306 ifaces_
[i
]->saveDependencies(dependencies
);
311 // The 'concurrent' client is a thread safe client that correctly handles
312 // out of order responses. It is slower than the regular client, so should
313 // only be used when you need to share a connection among multiple threads
314 class DependencyConcurrentClient
: virtual public DependencyIf
{
316 DependencyConcurrentClient(std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> prot
) {
319 DependencyConcurrentClient(std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> iprot
, std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> oprot
) {
320 setProtocol(iprot
,oprot
);
323 void setProtocol(std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> prot
) {
324 setProtocol(prot
,prot
);
326 void setProtocol(std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> iprot
, std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> oprot
) {
329 iprot_
= iprot
.get();
330 oprot_
= oprot
.get();
333 std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> getInputProtocol() {
336 std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> getOutputProtocol() {
339 void getDependenciesForTrace(Dependencies
& _return
, const std::string
& traceId
);
340 int32_t send_getDependenciesForTrace(const std::string
& traceId
);
341 void recv_getDependenciesForTrace(Dependencies
& _return
, const int32_t seqid
);
342 void saveDependencies(const Dependencies
& dependencies
);
343 void send_saveDependencies(const Dependencies
& dependencies
);
345 std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> piprot_
;
346 std::shared_ptr
< ::apache::thrift::protocol::TProtocol
> poprot_
;
347 ::apache::thrift::protocol::TProtocol
* iprot_
;
348 ::apache::thrift::protocol::TProtocol
* oprot_
;
349 ::apache::thrift::async::TConcurrentClientSyncInfo sync_
;
353 #pragma warning( pop )