Was this page helpful?
The future result of an operation.
It can represent a result if the operation completed successfully or an error if the operation failed. It can be waited on, polled or a callback can be attached.
Public Functions
Frees a future instance. A future can be freed anytime.
Sets a callback that is called when a future is set
future – [in]
callback – [in]
data – [in]
CASS_OK if successful, otherwise an error occurred
Gets the set status of the future.
future – [in]
true if set
Wait for the future to be set with either a result or error.
Important: Do not wait in a future callback. Waiting in a future callback will cause a deadlock.
future – [in]
Wait for the future to be set or timeout.
future – [in]
timeout_us – [in] wait time in microseconds
false if returned due to timeout
Gets the result of a successful future. If the future is not ready this method will wait for the future to be set.
See also
future – [in]
CassResult instance if successful, otherwise NULL for error. The return instance must be freed using cass_result_free().
Gets the error result from a future that failed as a result of a server error. If the future is not ready this method will wait for the future to be set.
See also
future – [in]
CassErrorResult instance if the request failed with a server error, otherwise NULL if the request was successful or the failure was not caused by a server error. The return instance must be freed using cass_error_result_free().
Gets the result of a successful future. If the future is not ready this method will wait for the future to be set. The first successful call consumes the future, all subsequent calls will return NULL.
See also
future – [in]
CassPrepared instance if successful, otherwise NULL for error. The return instance must be freed using cass_prepared_free().
Gets the error code from future. If the future is not ready this method will wait for the future to be set.
See also
cass_error_desc()
future – [in]
CASS_OK if successful, otherwise an error occurred.
Gets the error message from future. If the future is not ready this method will wait for the future to be set.
future – [in]
message – [out] Empty string returned if successful, otherwise a message describing the error is returned.
message_length – [out]
Gets the tracing ID associated with the request.
future – [in]
tracing_id – [out]
CASS_OK if successful, otherwise an error occurred.
Gets a the number of custom payload items from a response future. If the future is not ready this method will wait for the future to be set.
Requires Apache Cassandra: 2.2+
future – [in]
the number of custom payload items.
Gets a custom payload item from a response future at the specified index. If the future is not ready this method will wait for the future to be set.
Requires Apache Cassandra: 2.2+
future – [in]
index – [in]
name – [out]
name_length – [out]
value – [out]
value_size – [out]
CASS_OK if successful, otherwise an error occurred.
Gets the node that acted as coordinator for this query. If the future is not ready this method will wait for the future to be set.
See also
future –
The coordinator node that handled the query. The lifetime of this object is the same as the result object it came from. NULL can be returned if the future is not a response future or if an error occurs before a coordinator responds.
Was this page helpful?
On this page
CassFuture
CassFuture::cass_future_free()
CassFuture::cass_future_set_callback()
CassFuture::cass_future_ready()
CassFuture::cass_future_wait()
CassFuture::cass_future_wait_timed()
CassFuture::cass_future_get_result()
CassFuture::cass_future_get_error_result()
CassFuture::cass_future_get_prepared()
CassFuture::cass_future_error_code()
CassFuture::cass_future_error_message()
CassFuture::cass_future_tracing_id()
CassFuture::cass_future_custom_payload_item_count()
CassFuture::cass_future_custom_payload_item()
CassFuture::cass_future_coordinator()