OmniSciDB  04ee39c94c
ThriftOps.h File Reference
#include "ThriftService.h"
#include "ThriftWithRetry.h"
+ Include dependency graph for ThriftOps.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  anonymous_namespace{ThriftOps.h}::DoNothing
 

Namespaces

 anonymous_namespace{ThriftOps.h}
 

Functions

template<ThriftService THRIFT_SERVICE, typename CONTEXT_TYPE , typename ON_SUCCESS_LAMBDA = DoNothing, typename ON_FAIL_LAMBDA = DoNothing>
bool thrift_op (CONTEXT_TYPE &context, ON_SUCCESS_LAMBDA success_op=ON_SUCCESS_LAMBDA(), ON_FAIL_LAMBDA fail_op=ON_FAIL_LAMBDA(), int const try_count=1)
 
template<ThriftService THRIFT_SERVICE, typename CONTEXT_TYPE , typename ON_SUCCESS_LAMBDA = DoNothing, typename ON_FAIL_LAMBDA = DoNothing>
bool thrift_op (CONTEXT_TYPE &context, char const *arg, ON_SUCCESS_LAMBDA success_op=ON_SUCCESS_LAMBDA(), ON_FAIL_LAMBDA fail_op=ON_FAIL_LAMBDA(), int const try_count=1)
 

Function Documentation

◆ thrift_op() [1/2]

template<ThriftService THRIFT_SERVICE, typename CONTEXT_TYPE , typename ON_SUCCESS_LAMBDA = DoNothing, typename ON_FAIL_LAMBDA = DoNothing>
bool thrift_op ( CONTEXT_TYPE &  context,
ON_SUCCESS_LAMBDA  success_op = ON_SUCCESS_LAMBDA(),
ON_FAIL_LAMBDA  fail_op = ON_FAIL_LAMBDA(),
int const  try_count = 1 
)

Definition at line 18 of file ThriftOps.h.

References thrift_with_retry().

21  {
22  if (thrift_with_retry(THRIFT_SERVICE, context, nullptr, try_count)) {
23  success_op(context);
24  return true;
25  }
26 
27  fail_op(context);
28  return false;
29 }
bool thrift_with_retry(SERVICE_ENUM which_service, CLIENT_CONTEXT &context, char const *arg, const int try_count=1)
+ Here is the call graph for this function:

◆ thrift_op() [2/2]

template<ThriftService THRIFT_SERVICE, typename CONTEXT_TYPE , typename ON_SUCCESS_LAMBDA = DoNothing, typename ON_FAIL_LAMBDA = DoNothing>
bool thrift_op ( CONTEXT_TYPE &  context,
char const *  arg,
ON_SUCCESS_LAMBDA  success_op = ON_SUCCESS_LAMBDA(),
ON_FAIL_LAMBDA  fail_op = ON_FAIL_LAMBDA(),
int const  try_count = 1 
)

Definition at line 35 of file ThriftOps.h.

References kGET_SERVER_STATUS, and thrift_with_retry().

39  {
40  if (thrift_with_retry(THRIFT_SERVICE, context, arg, try_count)) {
41  thrift_with_retry(kGET_SERVER_STATUS, context, nullptr);
42  success_op(context);
43  return true;
44  }
45 
46  fail_op(context);
47  return false;
48 }
bool thrift_with_retry(SERVICE_ENUM which_service, CLIENT_CONTEXT &context, char const *arg, const int try_count=1)
+ Here is the call graph for this function: