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

Method __init__

cassandra/cluster.py:1114–1412  ·  view source on GitHub ↗

``executor_threads`` defines the number of threads in a pool for handling asynchronous tasks such as establishing connection pools or refreshing metadata. Any of the mutable Cluster attributes may be set as keyword arguments to the constructor.

(self,
                 contact_points=_NOT_SET,
                 port=9042,
                 compression=True,
                 auth_provider=None,
                 load_balancing_policy=None,
                 reconnection_policy=None,
                 default_retry_policy=None,
                 conviction_policy_factory=None,
                 metrics_enabled=False,
                 connection_class=None,
                 ssl_options=None,
                 sockopts=None,
                 cql_version=None,
                 protocol_version=_NOT_SET,
                 executor_threads=2,
                 max_schema_agreement_wait=10,
                 control_connection_timeout=2.0,
                 idle_heartbeat_interval=30,
                 schema_event_refresh_window=2,
                 topology_event_refresh_window=10,
                 connect_timeout=5,
                 schema_metadata_enabled=True,
                 token_metadata_enabled=True,
                 address_translator=None,
                 status_event_refresh_window=2,
                 prepare_on_all_hosts=True,
                 reprepare_on_up=True,
                 execution_profiles=None,
                 allow_beta_protocol_version=False,
                 timestamp_generator=None,
                 idle_heartbeat_timeout=30,
                 no_compact=False,
                 ssl_context=None,
                 endpoint_factory=None,
                 application_name=None,
                 application_version=None,
                 monitor_reporting_enabled=True,
                 monitor_reporting_interval=30,
                 client_id=None,
                 cloud=None,
                 column_encryption_policy=None)

Source from the content-addressed store, hash-verified

1112 _listener_lock = None
1113
1114 def __init__(self,
1115 contact_points=_NOT_SET,
1116 port=9042,
1117 compression=True,
1118 auth_provider=None,
1119 load_balancing_policy=None,
1120 reconnection_policy=None,
1121 default_retry_policy=None,
1122 conviction_policy_factory=None,
1123 metrics_enabled=False,
1124 connection_class=None,
1125 ssl_options=None,
1126 sockopts=None,
1127 cql_version=None,
1128 protocol_version=_NOT_SET,
1129 executor_threads=2,
1130 max_schema_agreement_wait=10,
1131 control_connection_timeout=2.0,
1132 idle_heartbeat_interval=30,
1133 schema_event_refresh_window=2,
1134 topology_event_refresh_window=10,
1135 connect_timeout=5,
1136 schema_metadata_enabled=True,
1137 token_metadata_enabled=True,
1138 address_translator=None,
1139 status_event_refresh_window=2,
1140 prepare_on_all_hosts=True,
1141 reprepare_on_up=True,
1142 execution_profiles=None,
1143 allow_beta_protocol_version=False,
1144 timestamp_generator=None,
1145 idle_heartbeat_timeout=30,
1146 no_compact=False,
1147 ssl_context=None,
1148 endpoint_factory=None,
1149 application_name=None,
1150 application_version=None,
1151 monitor_reporting_enabled=True,
1152 monitor_reporting_interval=30,
1153 client_id=None,
1154 cloud=None,
1155 column_encryption_policy=None):
1156 """
1157 ``executor_threads`` defines the number of threads in a pool for handling asynchronous tasks such as
1158 establishing connection pools or refreshing metadata.
1159
1160 Any of the mutable Cluster attributes may be set as keyword arguments to the constructor.
1161 """
1162 if connection_class is not None:
1163 self.connection_class = connection_class
1164
1165 if cloud is not None:
1166 self.cloud = cloud
1167 if contact_points is not _NOT_SET or endpoint_factory or ssl_context or ssl_options:
1168 raise ValueError("contact_points, endpoint_factory, ssl_context, and ssl_options "
1169 "cannot be specified with a cloud configuration")
1170
1171 uses_twisted = TwistedConnection and issubclass(self.connection_class, TwistedConnection)

Callers 5

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 15

create_from_sniMethod · 0.95
SniEndPointFactoryClass · 0.90
DefaultEndPointClass · 0.90
WeakSetClass · 0.90
MetadataClass · 0.90
MetricsClass · 0.90

Tested by

no test coverage detected