#include <jobinterface.hpp>
|
virtual | ~JobInterface ()=default |
|
virtual void | async (std::function< void()> func)=0 |
|
virtual void | setTimeout (std::function< void()> func, int ms, std::optional< std::string > timerId=std::nullopt)=0 |
|
virtual void | setInterval (std::function< void()> func, int ms, std::optional< std::string > timerId=std::nullopt)=0 |
|
virtual void | cancel (std::string timerId)=0 |
| cancels all pending timers with timerId More...
|
|
virtual void | submit (BaseJob job, std::function< void(Response)> callback)=0 |
| makes an async fetch. More...
|
|
◆ ~JobInterface()
virtual Kazv::JobInterface::~JobInterface |
( |
| ) |
|
|
virtualdefault |
◆ async()
virtual void Kazv::JobInterface::async |
( |
std::function< void()> |
func | ) |
|
|
pure virtual |
◆ cancel()
virtual void Kazv::JobInterface::cancel |
( |
std::string |
timerId | ) |
|
|
pure virtual |
◆ setInterval()
virtual void Kazv::JobInterface::setInterval |
( |
std::function< void()> |
func, |
|
|
int |
ms, |
|
|
std::optional< std::string > |
timerId = std::nullopt |
|
) |
| |
|
pure virtual |
◆ setTimeout()
virtual void Kazv::JobInterface::setTimeout |
( |
std::function< void()> |
func, |
|
|
int |
ms, |
|
|
std::optional< std::string > |
timerId = std::nullopt |
|
) |
| |
|
pure virtual |
◆ submit()
virtual void Kazv::JobInterface::submit |
( |
BaseJob |
job, |
|
|
std::function< void(Response)> |
callback |
|
) |
| |
|
pure virtual |
makes an async fetch.
callback should not block the current thread. if job has a queueId
, it must be queued and executed only after every job before it in the queue queueId
returned. if job has a queuePolicy
of CancelFutureIfFailed, the failure of this job must remove every other job after it in the queue queueId
.
Implemented in Kazv::CprJobHandler.
The documentation for this struct was generated from the following file: