class Builder
Cassandra\Cluster
builder allows fluent configuration of the cluster instance.
Methods
Cassandra\Cluster
build
( )Returns a Cassandra\Cluster
Instance.
Configures default consistency for all requests.
Configures default page size for all results. Cassandra\Set
to null
to disable paging altogether.
Configures default timeout for future resolution in blocking operations Cassandra\Set
to null to disable (default).
Configures the initial endpoints. Note that the driver will automatically discover and connect to the rest of the cluster.
Specify a different port to be used when connecting to the cluster.
Cluster\Builder
withRoundRobinLoadBalancingPolicy
( )Configures this cluster to use a round robin load balancing policy.
Cluster\Builder
withDatacenterAwareRoundRobinLoadBalancingPolicy
(string
$localDatacenter, int
$hostPerRemoteDatacenter, bool
$useRemoteDatacenterForLocalConsistencies )
Configures this cluster to use a datacenter aware round robin load balancing policy.
Enable token aware routing.
Configures cassandra authentication.
Timeout used for establishing TCP connections.
Timeout used for waiting for a response from a node.
Cassandra\Set
up ssl context.
Enable persistent sessions and clusters.
Total number of IO threads to use for handling the requests.
Note: number of io threads * core connections per host <= total number of connections <= number of io threads * max connections per host
Cassandra\Set
the size of connection pools used by the driver. Pools are fixed when only $core
is given, when a $max
is specified as well, additional connections will be created automatically based on current load until the maximum number of connection has been reached. When request load goes down, extra connections are automatically cleaned up until only the core number of connections is left.
Specify interval in seconds that the driver should wait before attempting to re-establish a closed connection.
Enables/disables latency-aware routing.
Disables nagle algorithm for lower latency.
Enables/disables TCP keepalive.