1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
|
``cassandra.cluster`` - Clusters and Sessions
=============================================
.. module:: cassandra.cluster
.. autoclass:: Cluster ([contact_points=('127.0.0.1',)][, port=9042][, executor_threads=2], **attr_kwargs)
.. autoattribute:: contact_points
.. autoattribute:: port
.. autoattribute:: cql_version
.. autoattribute:: protocol_version
.. autoattribute:: compression
.. autoattribute:: auth_provider
.. autoattribute:: load_balancing_policy
.. autoattribute:: reconnection_policy
.. autoattribute:: default_retry_policy
:annotation: = <cassandra.policies.RetryPolicy object>
.. autoattribute:: conviction_policy_factory
.. autoattribute:: address_translator
.. autoattribute:: metrics_enabled
.. autoattribute:: metrics
.. autoattribute:: ssl_context
.. autoattribute:: ssl_options
.. autoattribute:: sockopts
.. autoattribute:: max_schema_agreement_wait
.. autoattribute:: metadata
.. autoattribute:: connection_class
.. autoattribute:: control_connection_timeout
.. autoattribute:: idle_heartbeat_interval
.. autoattribute:: idle_heartbeat_timeout
.. autoattribute:: schema_event_refresh_window
.. autoattribute:: topology_event_refresh_window
.. autoattribute:: status_event_refresh_window
.. autoattribute:: prepare_on_all_hosts
.. autoattribute:: reprepare_on_up
.. autoattribute:: connect_timeout
.. autoattribute:: schema_metadata_enabled
:annotation: = True
.. autoattribute:: token_metadata_enabled
:annotation: = True
.. autoattribute:: timestamp_generator
.. autoattribute:: endpoint_factory
.. autoattribute:: cloud
.. automethod:: connect
.. automethod:: shutdown
.. automethod:: register_user_type
.. automethod:: register_listener
.. automethod:: unregister_listener
.. automethod:: add_execution_profile
.. automethod:: set_max_requests_per_connection
.. automethod:: get_max_requests_per_connection
.. automethod:: set_min_requests_per_connection
.. automethod:: get_min_requests_per_connection
.. automethod:: get_core_connections_per_host
.. automethod:: set_core_connections_per_host
.. automethod:: get_max_connections_per_host
.. automethod:: set_max_connections_per_host
.. automethod:: get_control_connection_host
.. automethod:: refresh_schema_metadata
.. automethod:: refresh_keyspace_metadata
.. automethod:: refresh_table_metadata
.. automethod:: refresh_user_type_metadata
.. automethod:: refresh_user_function_metadata
.. automethod:: refresh_user_aggregate_metadata
.. automethod:: refresh_nodes
.. automethod:: set_meta_refresh_enabled
.. autoclass:: ExecutionProfile (load_balancing_policy=<object object>, retry_policy=None, consistency_level=ConsistencyLevel.LOCAL_ONE, serial_consistency_level=None, request_timeout=10.0, row_factory=<function named_tuple_factory>, speculative_execution_policy=None)
:members:
:exclude-members: consistency_level
.. autoattribute:: consistency_level
:annotation: = LOCAL_ONE
.. autoclass:: GraphExecutionProfile (load_balancing_policy=_NOT_SET, retry_policy=None, consistency_level=ConsistencyLevel.LOCAL_ONE, serial_consistency_level=None, request_timeout=30.0, row_factory=None, graph_options=None, continuous_paging_options=_NOT_SET)
:members:
.. autoclass:: GraphAnalyticsExecutionProfile (load_balancing_policy=None, retry_policy=None, consistency_level=ConsistencyLevel.LOCAL_ONE, serial_consistency_level=None, request_timeout=3600. * 24. * 7., row_factory=None, graph_options=None)
:members:
.. autodata:: EXEC_PROFILE_DEFAULT
:annotation:
.. autodata:: EXEC_PROFILE_GRAPH_DEFAULT
:annotation:
.. autodata:: EXEC_PROFILE_GRAPH_SYSTEM_DEFAULT
:annotation:
.. autodata:: EXEC_PROFILE_GRAPH_ANALYTICS_DEFAULT
:annotation:
.. autoclass:: Session ()
.. autoattribute:: default_timeout
:annotation: = 10.0
.. autoattribute:: default_consistency_level
:annotation: = LOCAL_ONE
.. autoattribute:: default_serial_consistency_level
:annotation: = None
.. autoattribute:: row_factory
:annotation: = <function named_tuple_factory>
.. autoattribute:: default_fetch_size
.. autoattribute:: use_client_timestamp
.. autoattribute:: timestamp_generator
.. autoattribute:: encoder
.. autoattribute:: client_protocol_handler
.. automethod:: execute(statement[, parameters][, timeout][, trace][, custom_payload][, paging_state][, host][, execute_as])
.. automethod:: execute_async(statement[, parameters][, trace][, custom_payload][, paging_state][, host][, execute_as])
.. automethod:: execute_graph(statement[, parameters][, trace][, execution_profile=EXEC_PROFILE_GRAPH_DEFAULT][, execute_as])
.. automethod:: execute_graph_async(statement[, parameters][, trace][, execution_profile=EXEC_PROFILE_GRAPH_DEFAULT][, execute_as])
.. automethod:: prepare(statement)
.. automethod:: shutdown()
.. automethod:: set_keyspace(keyspace)
.. automethod:: get_execution_profile
.. automethod:: execution_profile_clone_update
.. automethod:: add_request_init_listener
.. automethod:: remove_request_init_listener
.. autoclass:: ResponseFuture ()
.. autoattribute:: query
.. automethod:: result()
.. automethod:: get_query_trace()
.. automethod:: get_all_query_traces()
.. autoattribute:: custom_payload()
.. autoattribute:: is_schema_agreed
.. autoattribute:: has_more_pages
.. autoattribute:: warnings
.. automethod:: start_fetching_next_page()
.. automethod:: add_callback(fn, *args, **kwargs)
.. automethod:: add_errback(fn, *args, **kwargs)
.. automethod:: add_callbacks(callback, errback, callback_args=(), callback_kwargs=None, errback_args=(), errback_kwargs=None)
.. autoclass:: ResultSet ()
:members:
.. autoexception:: QueryExhausted ()
.. autoexception:: NoHostAvailable ()
:members:
.. autoexception:: UserTypeDoesNotExist ()
|