![]() |
Apache Ignite C++ Client
|
#include <job_execution.h>
Public Types | |
| enum class | operation_result { SUCCESS , INVALID_STATE , NOT_FOUND } |
Public Member Functions | |
| job_execution (std::shared_ptr< detail::job_execution_impl > impl) | |
| IGNITE_API uuid | get_id () const |
| IGNITE_API const cluster_node & | get_node () const |
| IGNITE_API void | get_state_async (ignite_callback< std::optional< job_state > > callback) |
| IGNITE_API std::optional< job_state > | get_state () |
| IGNITE_API void | get_result_async (ignite_callback< std::optional< binary_object > > callback) |
| IGNITE_API std::optional< binary_object > | get_result () |
| IGNITE_API void | cancel_async (ignite_callback< operation_result > callback) |
| IGNITE_API operation_result | cancel () |
| IGNITE_API void | change_priority_async (std::int32_t priority, ignite_callback< operation_result > callback) |
| IGNITE_API operation_result | change_priority (std::int32_t priority) |
Job control object, provides information about the job execution process and result, allows cancelling the job.
|
strong |
|
inlineexplicit |
Constructor.
| impl | Implementation. |
|
inline |
Cancels the job execution.
| void ignite::job_execution::cancel_async | ( | ignite_callback< operation_result > | callback | ) |
Cancels the job execution asynchronously.
| callback | Callback to be called when the operation is complete. Called with the cancel result. |
|
inline |
Changes the job priority. After priority change, the job will be the last in the queue of jobs with the same priority.
| priority | New priority. |
| void ignite::job_execution::change_priority_async | ( | std::int32_t | priority, |
| ignite_callback< operation_result > | callback ) |
Changes the job priority asynchronously. After priority change, the job will be the last in the queue of jobs with the same priority.
| priority | New priority. |
| callback | Callback to be called when the operation is complete. Called with the operation result. |
|
nodiscard |
Gets the job ID.
|
nodiscard |
Gets the cluster node.
|
inline |
Gets the job execution result.
Only one thread can wait for a result at a time, which means you cannot call this method in parallel from multiple threads.
| void ignite::job_execution::get_result_async | ( | ignite_callback< std::optional< binary_object > > | callback | ) |
Gets the job execution result asynchronously.
Only one callback can be submitted for this operation at a time, which means you cannot call this method in parallel.
| callback | Callback to be called when the operation is complete. Called with the job execution result. |
|
inline |
Gets the job execution state. Can be nullopt if the job state no longer exists due to exceeding the retention time limit.
nullopt if the job state no longer exists due to exceeding the retention time limit. | void ignite::job_execution::get_state_async | ( | ignite_callback< std::optional< job_state > > | callback | ) |
Gets the job execution state asynchronously. Can be nullopt if the job state no longer exists due to exceeding the retention time limit.
| callback | Callback to be called when the operation is complete. Called with the job state. It Can be nullopt if the job state no longer exists due to exceeding the retention time limit. |