Click or drag to resize
Builder Class
Helper class to build Cluster instances.
Inheritance Hierarchy
SystemObject
  DseBuilder
    DseDseClusterBuilder

Namespace: Dse
Assembly: Dse (in Dse.dll) Version: 2.1.0
Syntax
C#
public class Builder : IInitializer

The Builder type exposes the following members.

Constructors
  NameDescription
Public methodBuilder
Initializes a new instance of the Builder class
Top
Methods
  NameDescription
Public methodAddContactPoint(IPAddress)
Add contact point. See AddContactPoint(String) for more details on contact points.
Public methodAddContactPoint(IPEndPoint)
Add contact point. See AddContactPoint(String) for more details on contact points.
Public methodAddContactPoint(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.
Public methodAddContactPoints(IEnumerableIPAddress)
Add contact points. See Builder.AddContactPoint for more details on contact points.
Public methodAddContactPoints(IEnumerableIPEndPoint)
Add contact points. See Builder.AddContactPoint for more details on contact points.
Public methodAddContactPoints(IEnumerableString)
Add contact points. See Builder.AddContactPoint for more details on contact points.
Public methodAddContactPoints(IPAddress)
Add contact points. See Builder.AddContactPoint for more details on contact points.
Public methodAddContactPoints(IPEndPoint)
Add contact points. See Builder.AddContactPoint for more details on contact points.
Public methodAddContactPoints(String)
Add contact points. See AddContactPoint(String) for more details on contact points.
Public methodBuild
Build the cluster with the configured set of initial contact points and policies. This is a shorthand for Cluster.buildFrom(this).
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetConfiguration
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

.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWithAddressTranslator
Configures the address translater to use for the new cluster.
Public methodWithAuthProvider
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

Public methodWithCompression
Sets the compression to use for the transport.
Public methodWithConnectionString
Configure the cluster by applying settings from ConnectionString.
Public methodWithCredentials
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.

Public methodWithCustomCompressor
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.
Public methodWithDefaultKeyspace
Sets default keyspace name for the created cluster.
Public methodWithLoadBalancingPolicy
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.

Public methodWithMaxProtocolVersion(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.

Public methodWithMaxProtocolVersion(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.

Public methodWithoutRowSetBuffering
Disables row set buffering for the created cluster (row set buffering is enabled by default otherwise).
Public methodWithPoolingOptions
Public methodWithPort
The port to use to connect to all Cassandra hosts. If not set through this method, the default port (9042) will be used instead.
Public methodWithQueryOptions
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.
Public methodWithQueryTimeout
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 to
20,000
(20 seconds).
Public methodWithReconnectionPolicy
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.

Public methodWithRetryPolicy
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.

Public methodWithSocketOptions
Configures the socket options that are going to be used to create the connections to the hosts.
Public methodWithSpeculativeExecutionPolicy
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.

Public methodWithSSL
Enables the use of SSL for the created Cluster. Calling this method will use default SSL options.
Public methodWithSSL(SSLOptions)
Enables the use of SSL for the created Cluster using the provided options.
Public methodWithTimestampGenerator
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.

Public methodWithTypeSerializers
Top
Properties
  NameDescription
Public propertyContactPoints
Public propertyPoolingOptions
The pooling options used by this builder.
Public propertySocketOptions
The socket options used by this builder.
Top
See Also

Reference