MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / ExecutionProfile

Class ExecutionProfile

cassandra/cluster.py:338–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336
337
338class ExecutionProfile(object):
339 load_balancing_policy = None
340 """
341 An instance of :class:`.policies.LoadBalancingPolicy` or one of its subclasses.
342
343 Used in determining host distance for establishing connections, and routing requests.
344
345 Defaults to ``TokenAwarePolicy(DCAwareRoundRobinPolicy())`` if not specified
346 """
347
348 retry_policy = None
349 """
350 An instance of :class:`.policies.RetryPolicy` instance used when :class:`.Statement` objects do not have a
351 :attr:`~.Statement.retry_policy` explicitly set.
352
353 Defaults to :class:`.RetryPolicy` if not specified
354 """
355
356 consistency_level = ConsistencyLevel.LOCAL_ONE
357 """
358 :class:`.ConsistencyLevel` used when not specified on a :class:`.Statement`.
359 """
360
361 serial_consistency_level = None
362 """
363 Serial :class:`.ConsistencyLevel` used when not specified on a :class:`.Statement` (for LWT conditional statements).
364 """
365
366 request_timeout = 10.0
367 """
368 Request timeout used when not overridden in :meth:`.Session.execute`
369 """
370
371 row_factory = staticmethod(named_tuple_factory)
372 """
373 A callable to format results, accepting ``(colnames, rows)`` where ``colnames`` is a list of column names, and
374 ``rows`` is a list of tuples, with each tuple representing a row of parsed values.
375
376 Some example implementations:
377
378 - :func:`cassandra.query.tuple_factory` - return a result row as a tuple
379 - :func:`cassandra.query.named_tuple_factory` - return a result row as a named tuple
380 - :func:`cassandra.query.dict_factory` - return a result row as a dict
381 - :func:`cassandra.query.ordered_dict_factory` - return a result row as an OrderedDict
382 """
383
384 speculative_execution_policy = None
385 """
386 An instance of :class:`.policies.SpeculativeExecutionPolicy`
387
388 Defaults to :class:`.NoSpeculativeExecutionPolicy` if not specified
389 """
390
391 continuous_paging_options = None
392 """
393 *Note:* This feature is implemented to facilitate server integration testing. It is not intended for general use in the Python driver.
394 See :attr:`.Statement.fetch_size` or :attr:`Session.default_fetch_size` for configuring normal paging.
395

Calls

no outgoing calls