Go to the documentation of this file.
21 #ifndef GRPCPP_ALARM_IMPL_H
22 #define GRPCPP_ALARM_IMPL_H
69 Alarm(
Alarm&& rhs) : alarm_(rhs.alarm_) { rhs.alarm_ =
nullptr; }
80 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
85 void Set(
const T& deadline, std::function<
void(
bool)> f) {
100 template <
typename T>
101 void Set(
const T& deadline, std::function<
void(
bool)> f) {
118 void SetInternal(
gpr_timespec deadline, std::function<
void(
bool)> f);
125 #endif // GRPCPP_ALARM_IMPL_H
Classes that require gRPC to be initialized should inherit from this class.
Definition: grpc_library.h:38
Alarm(Alarm &&rhs)
Alarms are movable.
Definition: alarm_impl.h:69
experimental_type(Alarm *alarm)
Definition: alarm_impl.h:95
Alarm()
Create an unset completion queue alarm.
Alarm & operator=(const Alarm &)=delete
Alarm(::grpc::CompletionQueue *cq, const T &deadline, void *tag)
DEPRECATED: Create and set a completion queue alarm instance associated to cq.
Definition: alarm_impl.h:51
void Cancel()
Cancel a completion queue alarm.
experimental_type experimental()
NOTE: The function experimental() is not stable public API.
Definition: alarm_impl.h:113
Alarm & operator=(Alarm &&rhs)
Definition: alarm_impl.h:70
void Set(const T &deadline, std::function< void(bool)> f)
Set an alarm to invoke callback f.
Definition: alarm_impl.h:101
~Alarm()
Destroy the given completion queue alarm, cancelling it in the process.
Definition: alarm_impl.h:35
void Set(::grpc::CompletionQueue *cq, const T &deadline, void *tag)
Trigger an alarm instance on completion queue cq at the specified time.
Definition: alarm_impl.h:60
An interface allowing implementors to process and filter event tags.
Definition: completion_queue_tag.h:26
A thin wrapper around grpc_completion_queue (see src/core/lib/surface/completion_queue....
Definition: completion_queue_impl.h:103
NOTE: class experimental_type is not part of the public API of this class TODO(vjpai): Move these con...
Definition: alarm_impl.h:93
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm_impl.h:33
Analogous to struct timespec.
Definition: gpr_types.h:47
If you are trying to use CompletionQueue::AsyncNext with a time class that isn't either gpr_timespec ...
Definition: time.h:40