Add docs for ResponseFuture.custom_paylaod

This commit is contained in:
Adam Holmberg
2015-04-24 10:24:37 -05:00
parent 2c062213fd
commit 9f0ca79a70
2 changed files with 13 additions and 0 deletions

View File

@@ -2677,6 +2677,17 @@ class ResponseFuture(object):
@property
def custom_payload(self):
"""
The custom payload returned from the server, if any. This will only be
set by Cassandra servers implementing a custom QueryHandler, and only
for protocol_version 4+.
Ensure the future is complete before trying to access this property
(call :meth:`.result()`, or after callback is invoked).
Otherwise it may throw if the response has not been received.
:return: :ref:`custom_payload`.
"""
if not self._event.is_set():
raise Exception("custom_payload cannot be retrieved before ResponseFuture is finalized")
return self._custom_payload

View File

@@ -102,6 +102,8 @@
.. automethod:: get_query_trace()
.. autoattribute:: custom_payload()
.. autoattribute:: has_more_pages
.. automethod:: start_fetching_next_page()