struct CassFuture
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.
Functions
void
cass_future_free
( future )Frees a future instance. A future can be freed anytime.
CassError
cass_future_set_callback
( future, callback, data )Sets a callback that is called when a future is set
cass_bool_t
cass_future_ready
( future )Gets the set status of the future.
void
cass_future_wait
( future )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.
cass_bool_t
cass_future_wait_timed
( future, timeout_us )Wait for the future to be set or timeout.
const CassResult *
cass_future_get_result
( future )Gets the result of a successful future. If the future is not ready this method will wait for the future to be set.
const CassErrorResult *
cass_future_get_error_result
( future )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.
const CassPrepared *
cass_future_get_prepared
( future )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.
CassError
cass_future_error_code
( future )Gets the error code from future. If the future is not ready this method will wait for the future to be set.
void
cass_future_error_message
( future, message, message_length )Gets the error message from future. If the future is not ready this method will wait for the future to be set.
size_t
cass_future_custom_payload_item_count
( future )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 Cassandra: 2.2+
CassError
cass_future_custom_payload_item
( future, index, name, name_length, value, value_size )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 Cassandra: 2.2+