C# 클래스 Dse.DseClusterBuilder

Helper class to build DseCluster instances.
상속: Cassandra.Builder
파일 보기 프로젝트 열기: datastax/csharp-driver-dse

공개 메소드들

메소드 설명
AddContactPoint ( IPAddress address ) : DseClusterBuilder

Add contact point. See Builder.AddContactPoint(string) for more details on contact points.

AddContactPoint ( IPEndPoint address ) : DseClusterBuilder

Add contact point. See Builder.AddContactPoint(string) for more details on contact points.

AddContactPoint ( string address ) : DseClusterBuilder

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.

However, this can be useful if the Cassandra nodes are behind a router and are not accessed directly. Note that if you are in this situation (Cassandra nodes are behind a router, not directly accessible), you almost surely want to provide a specific IAddressTranslator (through Builder.WithAddressTranslater) to translate actual Cassandra node addresses to the addresses the driver should use, otherwise the driver will not be able to auto-detect new nodes (and will generally not function optimally).

AddContactPoints ( ) : DseClusterBuilder

Add contact points. See Builder.AddContactPoint(string) for more details on contact points.

AddContactPoints ( IEnumerable addresses ) : DseClusterBuilder

Add contact points. See Builder.AddContactPoint for more details on contact points.

AddContactPoints ( IEnumerable addresses ) : DseClusterBuilder

Add contact points. See Builder.AddContactPoint for more details on contact points.

AddContactPoints ( IEnumerable addresses ) : DseClusterBuilder

Add contact points. See Builder.AddContactPoint for more details on contact points.

Build ( ) : DseCluster

Builds the cluster with the configured set of initial contact points and policies.

DseClusterBuilder ( ) : System

Creates a new instance of DseClusterBuilder.

WithAddressTranslator ( IAddressTranslator addressTranslator ) : DseClusterBuilder

Configures the address translater to use for the new cluster.

See IAddressTranslater for more detail on address translation, but the default tanslater, DefaultAddressTranslator, should be correct in most cases. If unsure, stick to the default.

WithAuthProvider ( IAuthProvider authProvider ) : DseClusterBuilder

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 ( CompressionType compression ) : DseClusterBuilder

Sets the compression to use for the transport.

WithConnectionString ( string connectionString ) : DseClusterBuilder

Configure the cluster by applying settings from ConnectionString.

WithCredentials ( String username, String password ) : DseClusterBuilder

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 ( IFrameCompressor compressor ) : DseClusterBuilder

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 ( string defaultKeyspace ) : DseClusterBuilder

Sets default keyspace name for the created cluster.

WithGraphOptions ( GraphOptions options ) : DseClusterBuilder

Sets the DSE Graph options.

WithLoadBalancingPolicy ( ILoadBalancingPolicy policy ) : DseClusterBuilder

Configures the load balancing policy to use for the new cluster.

If no load balancing policy is set through this method, DseLoadBalancingPolicy will be used instead.

WithMaxProtocolVersion ( byte version ) : DseClusterBuilder

Limits the maximum protocol version used to connect to the nodes, when it is not set protocol version used between the driver and the Cassandra cluster is negotiated upon establishing the first connection.

Useful for using the driver against a cluster that contains nodes with different major/minor versions of Cassandra. For example, preparing for a rolling upgrade of the Cluster.

Some Cassandra features are only available with a specific protocol version.

WithPoolingOptions ( Cassandra.PoolingOptions value ) : DseClusterBuilder

Sets the pooling options for the cluster.

WithPort ( int port ) : DseClusterBuilder

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 ( QueryOptions options ) : DseClusterBuilder

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 ( int queryAbortTimeout ) : DseClusterBuilder

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 ISession.Execute(string) to throw a System.TimeoutException after the specified number of milliseconds.

Default timeout value is set to 20,000 (20 seconds).

If you want to define a read timeout at a lower level, you can use Cassandra.SocketOptions.SetReadTimeoutMillis(int).

WithReconnectionPolicy ( IReconnectionPolicy policy ) : DseClusterBuilder

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 ( IRetryPolicy policy ) : DseClusterBuilder

Configure the retry policy to use for the new cluster.

If no retry policy is set through this method, IdempotenceAwareRetryPolicy will be used instead.

WithSSL ( ) : DseClusterBuilder

Enables the use of SSL for the created Cluster. Calling this method will use default SSL options.

If SSL is enabled, the driver will not connect to any Cassandra nodes that doesn't have SSL enabled and it is strongly advised to enable SSL on every Cassandra node if you plan on using SSL in the driver. Note that SSL certificate common name(CN) on Cassandra node must match Cassandra node hostname.

WithSSL ( SSLOptions sslOptions ) : DseClusterBuilder

Enables the use of SSL for the created Cluster using the provided options.

If SSL is enabled, the driver will not connect to any Cassandra nodes that doesn't have SSL enabled and it is strongly advised to enable SSL on every Cassandra node if you plan on using SSL in the driver. Note that SSL certificate common name(CN) on Cassandra node must match Cassandra node hostname.

WithSocketOptions ( SocketOptions value ) : DseClusterBuilder

Configures the socket options that are going to be used to create the connections to the hosts.

WithSpeculativeExecutionPolicy ( ISpeculativeExecutionPolicy policy ) : DseClusterBuilder

Configure the speculative execution to use for the new cluster.

If no speculative execution policy is set through this method, Cassandra.Policies.DefaultSpeculativeExecutionPolicy will be used instead.

WithTypeSerializers ( TypeSerializerDefinitions definitions ) : DseClusterBuilder

Sets the TypeSerializer{T} to be used, replacing the default ones.

메소드 상세

AddContactPoint() 공개 메소드

Add contact point. See Builder.AddContactPoint(string) for more details on contact points.
public AddContactPoint ( IPAddress address ) : DseClusterBuilder
address System.Net.IPAddress address of the node to add as contact point
리턴 DseClusterBuilder

AddContactPoint() 공개 메소드

Add contact point. See Builder.AddContactPoint(string) for more details on contact points.
public AddContactPoint ( IPEndPoint address ) : DseClusterBuilder
address System.Net.IPEndPoint address of the node to add as contact point
리턴 DseClusterBuilder

AddContactPoint() 공개 메소드

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.
However, this can be useful if the Cassandra nodes are behind a router and are not accessed directly. Note that if you are in this situation (Cassandra nodes are behind a router, not directly accessible), you almost surely want to provide a specific IAddressTranslator (through Builder.WithAddressTranslater) to translate actual Cassandra node addresses to the addresses the driver should use, otherwise the driver will not be able to auto-detect new nodes (and will generally not function optimally).
public AddContactPoint ( string address ) : DseClusterBuilder
address string the address of the node to connect to
리턴 DseClusterBuilder

AddContactPoints() 공개 메소드

Add contact points. See Builder.AddContactPoint(string) for more details on contact points.
public AddContactPoints ( ) : DseClusterBuilder
리턴 DseClusterBuilder

AddContactPoints() 공개 메소드

Add contact points. See Builder.AddContactPoint for more details on contact points.
public AddContactPoints ( IEnumerable addresses ) : DseClusterBuilder
addresses IEnumerable addresses of the nodes to add as contact point
리턴 DseClusterBuilder

AddContactPoints() 공개 메소드

Add contact points. See Builder.AddContactPoint for more details on contact points.
public AddContactPoints ( IEnumerable addresses ) : DseClusterBuilder
addresses IEnumerable addresses of the nodes to add as contact point ///
리턴 DseClusterBuilder

AddContactPoints() 공개 메소드

Add contact points. See Builder.AddContactPoint for more details on contact points.
public AddContactPoints ( IEnumerable addresses ) : DseClusterBuilder
addresses IEnumerable addresses of the nodes to add as contact point
리턴 DseClusterBuilder

Build() 공개 메소드

Builds the cluster with the configured set of initial contact points and policies.
public Build ( ) : DseCluster
리턴 DseCluster

DseClusterBuilder() 공개 메소드

Creates a new instance of DseClusterBuilder.
public DseClusterBuilder ( ) : System
리턴 System

WithAddressTranslator() 공개 메소드

Configures the address translater to use for the new cluster.
See IAddressTranslater for more detail on address translation, but the default tanslater, DefaultAddressTranslator, should be correct in most cases. If unsure, stick to the default.
public WithAddressTranslator ( IAddressTranslator addressTranslator ) : DseClusterBuilder
addressTranslator IAddressTranslator the translater to use.
리턴 DseClusterBuilder

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

public WithAuthProvider ( IAuthProvider authProvider ) : DseClusterBuilder
authProvider IAuthProvider the AuthProvider"> to use to login to Cassandra hosts.
리턴 DseClusterBuilder

WithCompression() 공개 메소드

Sets the compression to use for the transport.
public WithCompression ( CompressionType compression ) : DseClusterBuilder
compression CompressionType the compression to set
리턴 DseClusterBuilder

WithConnectionString() 공개 메소드

Configure the cluster by applying settings from ConnectionString.
public WithConnectionString ( string connectionString ) : DseClusterBuilder
connectionString string the ConnectionString to use
리턴 DseClusterBuilder

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.

public WithCredentials ( String username, String password ) : DseClusterBuilder
username String the user name to use to login to Cassandra hosts.
password String the password corresponding to
리턴 DseClusterBuilder

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.
public WithCustomCompressor ( IFrameCompressor compressor ) : DseClusterBuilder
compressor IFrameCompressor Implementation of IFrameCompressor
리턴 DseClusterBuilder

WithDefaultKeyspace() 공개 메소드

Sets default keyspace name for the created cluster.
public WithDefaultKeyspace ( string defaultKeyspace ) : DseClusterBuilder
defaultKeyspace string Default keyspace name.
리턴 DseClusterBuilder

WithGraphOptions() 공개 메소드

Sets the DSE Graph options.
public WithGraphOptions ( GraphOptions options ) : DseClusterBuilder
options GraphOptions
리턴 DseClusterBuilder

WithLoadBalancingPolicy() 공개 메소드

Configures the load balancing policy to use for the new cluster.

If no load balancing policy is set through this method, DseLoadBalancingPolicy will be used instead.

public WithLoadBalancingPolicy ( ILoadBalancingPolicy policy ) : DseClusterBuilder
policy ILoadBalancingPolicy the load balancing policy to use
리턴 DseClusterBuilder

WithMaxProtocolVersion() 공개 메소드

Limits the maximum protocol version used to connect to the nodes, when it is not set protocol version used between the driver and the Cassandra cluster is negotiated upon establishing the first connection.

Useful for using the driver against a cluster that contains nodes with different major/minor versions of Cassandra. For example, preparing for a rolling upgrade of the Cluster.

Some Cassandra features are only available with a specific protocol version.
public WithMaxProtocolVersion ( byte version ) : DseClusterBuilder
version byte /// The native protocol version. /// Different Cassandra versions support a range of protocol versions, for example: /// - Cassandra 2.0 (DSE 4.0 – 4.6): Supports protocol versions 1 and 2. /// - Cassandra 2.1 (DSE 4.7 – 4.8): Supports protocol versions 1, 2 and 3. /// - Cassandra 2.2: Supports protocol versions 1, 2, 3 and 4. /// - Cassandra 3.0: Supports protocol versions 3 and 4. ///
리턴 DseClusterBuilder

WithPoolingOptions() 공개 메소드

Sets the pooling options for the cluster.
public WithPoolingOptions ( Cassandra.PoolingOptions value ) : DseClusterBuilder
value Cassandra.PoolingOptions
리턴 DseClusterBuilder

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.
public WithPort ( int port ) : DseClusterBuilder
port int the port to set.
리턴 DseClusterBuilder

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.
public WithQueryOptions ( QueryOptions options ) : DseClusterBuilder
options QueryOptions the QueryOptions to use.
리턴 DseClusterBuilder

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 ISession.Execute(string) to throw a System.TimeoutException after the specified number of milliseconds.

Default timeout value is set to 20,000 (20 seconds).
If you want to define a read timeout at a lower level, you can use Cassandra.SocketOptions.SetReadTimeoutMillis(int).
public WithQueryTimeout ( int queryAbortTimeout ) : DseClusterBuilder
queryAbortTimeout int Timeout specified in milliseconds.
리턴 DseClusterBuilder

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.

public WithReconnectionPolicy ( IReconnectionPolicy policy ) : DseClusterBuilder
policy IReconnectionPolicy the reconnection policy to use
리턴 DseClusterBuilder

WithRetryPolicy() 공개 메소드

Configure the retry policy to use for the new cluster.

If no retry policy is set through this method, IdempotenceAwareRetryPolicy will be used instead.

public WithRetryPolicy ( IRetryPolicy policy ) : DseClusterBuilder
policy IRetryPolicy the retry policy to use
리턴 DseClusterBuilder

WithSSL() 공개 메소드

Enables the use of SSL for the created Cluster. Calling this method will use default SSL options.
If SSL is enabled, the driver will not connect to any Cassandra nodes that doesn't have SSL enabled and it is strongly advised to enable SSL on every Cassandra node if you plan on using SSL in the driver. Note that SSL certificate common name(CN) on Cassandra node must match Cassandra node hostname.
public WithSSL ( ) : DseClusterBuilder
리턴 DseClusterBuilder

WithSSL() 공개 메소드

Enables the use of SSL for the created Cluster using the provided options.
If SSL is enabled, the driver will not connect to any Cassandra nodes that doesn't have SSL enabled and it is strongly advised to enable SSL on every Cassandra node if you plan on using SSL in the driver. Note that SSL certificate common name(CN) on Cassandra node must match Cassandra node hostname.
public WithSSL ( SSLOptions sslOptions ) : DseClusterBuilder
sslOptions SSLOptions SSL options to use.
리턴 DseClusterBuilder

WithSocketOptions() 공개 메소드

Configures the socket options that are going to be used to create the connections to the hosts.
public WithSocketOptions ( SocketOptions value ) : DseClusterBuilder
value SocketOptions
리턴 DseClusterBuilder

WithSpeculativeExecutionPolicy() 공개 메소드

Configure the speculative execution to use for the new cluster.

If no speculative execution policy is set through this method, Cassandra.Policies.DefaultSpeculativeExecutionPolicy will be used instead.

public WithSpeculativeExecutionPolicy ( ISpeculativeExecutionPolicy policy ) : DseClusterBuilder
policy ISpeculativeExecutionPolicy the speculative execution policy to use
리턴 DseClusterBuilder

WithTypeSerializers() 공개 메소드

Sets the TypeSerializer{T} to be used, replacing the default ones.
public WithTypeSerializers ( TypeSerializerDefinitions definitions ) : DseClusterBuilder
definitions TypeSerializerDefinitions
리턴 DseClusterBuilder