Builder Methods |
The Builder type exposes the following members.
Name | Description | |
---|---|---|
AddContactPoint(IPAddress) |
Add contact point. See AddContactPoint(String) for more details
on contact points.
| |
AddContactPoint(IPEndPoint) |
Add contact point. See AddContactPoint(String) for more details
on contact points.
| |
AddContactPoint(String) |
Adds a contact point. Contact points are addresses of Cassandra nodes that
the driver uses to discover the cluster topology. Only one contact point is
required (the driver will retrieve the address of the other nodes
automatically), but it is usually a good idea to provide more than one
contact point, as if that unique contact point is not available, the driver
won't be able to initialize itself correctly.
| |
AddContactPoints(IEnumerableIPAddress) |
Add contact points. See Builder.AddContactPoint for more details
on contact points.
| |
AddContactPoints(IEnumerableIPEndPoint) |
Add contact points. See Builder.AddContactPoint for more details
on contact points.
| |
AddContactPoints(IEnumerableString) |
Add contact points. See Builder.AddContactPoint for more details
on contact points.
| |
AddContactPoints(IPAddress) |
Add contact points. See Builder.AddContactPoint for more details
on contact points.
| |
AddContactPoints(IPEndPoint) |
Add contact points. See Builder.AddContactPoint for more details
on contact points.
| |
AddContactPoints(String) |
Add contact points. See AddContactPoint(String) for more details
on contact points.
| |
Build |
Build the cluster with the configured set of initial contact points and policies.
| |
GetConfiguration |
The configuration that will be used for the new cluster. You should not modify this object directly as change made to the returned object may not be used by the cluster build. Instead, you should use the other methods of this Builder . | |
WithAddressTranslator |
Configures the address translater to use for the new cluster.
| |
WithAuthProvider |
Use the specified AuthProvider when connecting to Cassandra hosts. Use this method when a custom authentication scheme is in place. You shouldn't call both this method and {@code withCredentials}' on the same Builder instance as one will supersede the other | |
WithCompression |
Sets the compression to use for the transport.
| |
WithConnectionString |
Configure the cluster by applying settings from ConnectionString.
| |
WithCredentials |
Uses the provided credentials when connecting to Cassandra hosts. This should be used if the Cassandra cluster has been configured to use the PasswordAuthenticator. If the the default * AllowAllAuthenticator is used instead, using this method has no effect. | |
WithCustomCompressor |
Sets a custom compressor to be used for the compression type.
If specified, the compression type is mandatory.
If not specified the driver default compressor will be use for the compression type.
| |
WithDefaultKeyspace |
Sets default keyspace name for the created cluster.
| |
WithLoadBalancingPolicy |
Configure the load balancing policy to use for the new cluster. If no load balancing policy is set through this method, Policies.DefaultLoadBalancingPolicy will be used instead. | |
WithMaxProtocolVersion(Byte) | Limits the maximum protocol version used to connect to the nodes When it is not set, the protocol version used is negotiated between the driver and the Cassandra cluster upon establishing the first connection. Useful when connecting to a cluster that contains nodes with different major/minor versions of Cassandra. For example, preparing for a rolling upgrade of the Cluster. | |
WithMaxProtocolVersion(ProtocolVersion) | Limits the maximum protocol version used to connect to the nodes When it is not set, the protocol version used is negotiated between the driver and the Cassandra cluster upon establishing the first connection. Useful when connecting to a cluster that contains nodes with different major/minor versions of Cassandra. For example, preparing for a rolling upgrade of the Cluster. | |
WithNoCompact |
Enables the NO_COMPACT startup option.
When this option is set, SELECT, UPDATE, DELETE, and BATCH statements on COMPACT STORAGE tables function in "compatibility" mode which allows seeing these tables as if they were "regular" CQL tables. This option only affects interactions with tables using COMPACT STORAGE and it is only supported by C* 3.0.16+, 3.11.2+, 4.0+ and DSE 6.0+. | |
WithoutRowSetBuffering |
Disables row set buffering for the created cluster (row set buffering is enabled by
default otherwise).
| |
WithPoolingOptions | ||
WithPort |
The port to use to connect to all Cassandra hosts. If not set through this
method, the default port (9042) will be used instead.
| |
WithQueryOptions |
Sets the QueryOptions to use for the newly created Cluster.
If no query options are set through this method, default query
options will be used.
| |
WithQueryTimeout |
Specifies the number of milliseconds that the driver should wait for the response before the query times out in a synchronous operation.
This will cause that synchronous operations like Execute(String) to throw a TimeoutException after the specified number of milliseconds. Default timeout value is set to20,000 | |
WithReconnectionPolicy |
Configure the reconnection policy to use for the new cluster. If no reconnection policy is set through this method, Policies.DefaultReconnectionPolicy will be used instead. | |
WithRetryPolicy |
Configure the retry policy to be used for the new cluster.
When the retry policy is not set with this method, the DefaultRetryPolicy will be used instead. Use a IExtendedRetryPolicy implementation to cover all error scenarios. | |
WithSocketOptions |
Configures the socket options that are going to be used to create the connections to the hosts.
| |
WithSpeculativeExecutionPolicy |
Configure the speculative execution to use for the new cluster.
If no speculative execution policy is set through this method, DefaultSpeculativeExecutionPolicy will be used instead. | |
WithSSL |
Enables the use of SSL for the created Cluster. Calling this method will use default SSL options.
| |
WithSSL(SSLOptions) |
Enables the use of SSL for the created Cluster using the provided options.
| |
WithTimestampGenerator |
Configures the generator that will produce the client-side timestamp sent with each query.
This feature is only available with protocol version 3 or above of the native protocol. With earlier versions, timestamps are always generated server-side, and setting a generator through this method will have no effect. If no generator is set through this method, the driver will default to client-side timestamps by using AtomicMonotonicTimestampGenerator. | |
WithTypeSerializers |
Sets the TypeSerializerT to be used, replacing the default ones.
|