17#ifndef KUDU_CLIENT_CALLBACKS_H
18#define KUDU_CLIENT_CALLBACKS_H
20#ifdef KUDU_HEADERS_NO_STUBS
21#include "kudu/gutil/macros.h"
22#include "kudu/gutil/port.h"
24#include "kudu/client/stubs.h"
26#include "kudu/util/kudu_export.h"
68 virtual void Run(KuduLogSeverity severity,
71 const struct ::tm* time,
73 size_t message_len) = 0;
84 typedef void (T::*MemberType)(
85 KuduLogSeverity severity,
88 const struct ::tm* time,
104 virtual void Run(KuduLogSeverity severity,
105 const char* filename,
107 const struct ::tm* time,
109 size_t message_len) OVERRIDE {
110 (object_->*member_)(severity, filename, line_number, time,
111 message, message_len);
125 typedef void (*FunctionType)(T arg,
126 KuduLogSeverity severity,
127 const char* filename,
129 const struct ::tm* time,
140 : function_(function),
145 virtual void Run(KuduLogSeverity severity,
146 const char* filename,
148 const struct ::tm* time,
150 size_t message_len) OVERRIDE {
151 function_(arg_, severity, filename, line_number, time,
152 message, message_len);
156 FunctionType function_;
184 typedef void (T::*MemberType)(const
Status& s);
199 (object_->*member_)(s);
213 typedef void (*FunctionType)(T arg,
const Status& s);
223 : function_(function),
233 FunctionType function_;
A representation of an operation's outcome.
Definition status.h:165
The interface for all logging callbacks.
Definition callbacks.h:44
virtual void Run(KuduLogSeverity severity, const char *filename, int line_number, const struct ::tm *time, const char *message, size_t message_len)=0
The logging callback that invokes a function by pointer with a single argument.
Definition callbacks.h:122
KuduLoggingFunctionCallback(FunctionType function, T arg)
Definition callbacks.h:139
virtual void Run(KuduLogSeverity severity, const char *filename, int line_number, const struct ::tm *time, const char *message, size_t message_len) OVERRIDE
Definition callbacks.h:145
The logging callback that invokes a member function of an object.
Definition callbacks.h:81
virtual void Run(KuduLogSeverity severity, const char *filename, int line_number, const struct ::tm *time, const char *message, size_t message_len) OVERRIDE
Definition callbacks.h:104
KuduLoggingMemberCallback(T *object, MemberType member)
Definition callbacks.h:98
The interface for all status callbacks.
Definition callbacks.h:161
virtual void Run(const Status &s)=0
The status callback that invokes a function by pointer with a single argument.
Definition callbacks.h:210
KuduStatusFunctionCallback(FunctionType function, T arg)
Definition callbacks.h:222
virtual void Run(const Status &s) OVERRIDE
Definition callbacks.h:228
The status callback that invokes a member function of an object.
Definition callbacks.h:181
virtual void Run(const Status &s) OVERRIDE
Definition callbacks.h:198
KuduStatusMemberCallback(T *object, MemberType member)
Definition callbacks.h:192