• DataStax Enterprise C# Driver API Documentation

    Show / Hide Table of Contents
    • Dse
      • AggregateMetadata
      • AlreadyExistsException
      • AtomicMonotonicTimestampGenerator
      • AtomicMonotonicWinApiTimestampGenerator
      • AuthenticationException
      • BatchStatement
      • BatchType
      • BigIntegerTypeAdapter
      • BoundStatement
      • Builder
      • BusyPoolException
      • CassandraConnectionStringBuilder
      • ClientOptions
      • Cluster
      • ColumnDesc
      • ColumnTypeCode
      • CompressionType
      • Configuration
      • ConsistencyLevel
      • ConstantReconnectionPolicy
      • ConstantSpeculativeExecutionPolicy
      • CqlColumn
      • CustomColumnInfo
      • DataCollectionMetadata
      • DataCollectionMetadata.SortOrder
      • DCAwareRoundRobinPolicy
      • DecimalTypeAdapter
      • DefaultRetryPolicy
      • Diagnostics
      • DowngradingConsistencyRetryPolicy
      • DriverException
      • DriverInternalError
      • DseCluster
      • DseClusterBuilder
      • DseConfiguration
      • DseLoadBalancingPolicy
      • Duration
      • DynamicCompositeTypeAdapter
      • EC2MultiRegionTranslator
      • ExecutionException
      • ExecutionInfo
      • ExponentialReconnectionPolicy
      • Extensions
      • FallthroughRetryPolicy
      • FixedReconnectionPolicy
      • FunctionFailureException
      • FunctionMetadata
      • Host
      • HostDistance
      • HostsEventArgs
      • HostsEventArgs.Kind
      • HostsEventHandler
      • IAddressTranslator
      • IAuthenticator
      • IAuthProvider
      • IAuthProviderNamed
      • ICluster
      • IColumnInfo
      • IdempotenceAwareRetryPolicy
      • IDseCluster
      • IDseSession
      • IExecutionProfile
      • IExecutionProfileBuilder
      • IExecutionProfileOptions
      • IExtendedRetryPolicy
      • IFrameCompressor
      • IInitializer
      • ILoadBalancingPolicy
      • IndexMetadata
      • IndexMetadata.IndexKind
      • InvalidConfigurationInQueryException
      • InvalidQueryException
      • InvalidTypeException
      • IReconnectionPolicy
      • IReconnectionSchedule
      • IRetryPolicy
      • IsBootstrappingException
      • ISession
      • ISessionState
      • ISpeculativeExecutionPlan
      • ISpeculativeExecutionPolicy
      • IStatement
      • ITimestampGenerator
      • ITypeAdapter
      • KeyspaceMetadata
      • KeyType
      • ListColumnInfo
      • LocalDate
      • LocalTime
      • Logger
      • LoggingRetryPolicy
      • MapColumnInfo
      • MaterializedViewMetadata
      • Metadata
      • MetadataSyncOptions
      • MetricsExtensions
      • MonitorReportingOptions
      • NoHostAvailableException
      • NoneAuthProvider
      • NoSpeculativeExecutionPolicy
      • NullTypeAdapter
      • OperationTimedOutException
      • OverloadedException
      • PlainTextAuthProvider
      • Policies
      • PoolingOptions
      • PreparedQueryNotFoundException
      • PreparedStatement
      • PreparedStatementIdMismatchException
      • ProtocolErrorException
      • ProtocolOptions
      • ProtocolVersion
      • QueryExecutionException
      • QueryOptions
      • QueryProtocolOptions
      • QueryProtocolOptions.QueryFlags
      • QueryTimeoutException
      • QueryTrace
      • QueryTrace.Event
      • QueryValidationException
      • ReadFailureException
      • ReadTimeoutException
      • RegularStatement
      • ReplicationStrategies
      • RequestInvalidException
      • RetryDecision
      • RetryDecision.RetryDecisionType
      • RetryLoadBalancingPolicy
      • RetryLoadBalancingPolicyEventArgs
      • RoundRobinPolicy
      • RoutingKey
      • Row
      • RowSet
      • RowSetMetadata
      • SchemaChangedEventArgs
      • SchemaChangedEventArgs.Kind
      • SchemaChangedEventHandler
      • ServerErrorException
      • Session
      • SetColumnInfo
      • SimpleStatement
      • SocketOptions
      • SSLOptions
      • Statement
      • SyntaxError
      • TableColumn
      • TableMetadata
      • TableOptions
      • TimeUuid
      • TokenAwarePolicy
      • ToManyConnectionsPerHost
      • TraceRetrievalException
      • TruncateException
      • TupleColumnInfo
      • TypeAdapters
      • UdtColumnInfo
      • UdtMap
      • UdtMap<T>
      • UdtMappingDefinitions
      • UnauthorizedException
      • UnavailableException
      • Unset
      • WriteFailureException
      • WriteTimeoutException
    • Dse.AppMetrics
      • DriverAppMetricsOptions
    • Dse.AppMetrics.MetricTypes
      • IAppMetricsCounter
      • IAppMetricsGauge
      • IAppMetricsMeter
      • IAppMetricsMetric
      • IAppMetricsTimer
    • Dse.AppMetrics.MetricValues
      • IAppMetricsHistogramValue
      • IAppMetricsMeterValue
      • IAppMetricsMetricWithValue<T>
      • IAppMetricsTimerValue
    • Dse.Auth
      • DseGssapiAuthProvider
      • DsePlainTextAuthProvider
    • Dse.Auth.Sspi
      • SspiException
    • Dse.Data
      • CqlBatchTransaction
      • CqlCommand
      • CqlConnection
      • CqlDataAdapter
      • CqlParameter
      • CqlParameterCollection
      • CqlProviderFactory
      • CqlReader
    • Dse.Data.Linq
      • AllowFilteringAttribute
      • Batch
      • ClusteringKeyAttribute
      • ColumnAttribute
      • CompactStorageAttribute
      • CounterAttribute
      • CqlArgumentException
      • CqlCommand
      • CqlConditionalCommand<TEntity>
      • CqlDelete
      • CqlFunction
      • CqlInsert<TEntity>
      • CqlLinqNotSupportedException
      • CqlOperator
      • CqlQuery<TEntity>
      • CqlQueryBase<TEntity>
      • CqlQueryExtensions
      • CqlQuerySingleElement<TEntity>
      • CqlScalar<TEntity>
      • CqlToken
      • CqlUpdate
      • IgnoreAttribute
      • ITable
      • PartitionKeyAttribute
      • SecondaryIndexAttribute
      • SessionExtensions
      • StaticColumnAttribute
      • Table<TEntity>
      • TableAttribute
      • TableType
    • Dse.Geometry
      • GeometryBase
      • LineString
      • Point
      • Polygon
    • Dse.Graph
      • Edge
      • Element
      • GraphNode
      • GraphOptions
      • GraphResultSet
      • GraphStatement
      • IEdge
      • IElement
      • IGraphNode
      • IGraphStatement
      • IPath
      • IProperty
      • IVertex
      • IVertexProperty
      • Path
      • SimpleGraphStatement
      • Vertex
    • Dse.Mapping
      • AppliedInfo<T>
      • ColumnMap
      • Cql
      • CqlQueryOptions
      • IColumnDefinition
      • ICqlBatch
      • ICqlQueryAsyncClient
      • ICqlQueryClient
      • ICqlWriteAsyncClient
      • ICqlWriteClient
      • IMapper
      • IPage<T>
      • ITypeDefinition
      • Map<TPoco>
      • Mapper
      • MappingConfiguration
      • Mappings
      • SortOrder
    • Dse.Mapping.Attributes
      • ClusteringKeyAttribute
      • ColumnAttribute
      • CounterAttribute
      • FrozenAttribute
      • FrozenKeyAttribute
      • FrozenValueAttribute
      • IgnoreAttribute
      • PartitionKeyAttribute
      • SecondaryIndexAttribute
      • StaticColumnAttribute
      • TableAttribute
    • Dse.Mapping.TypeConversion
      • DefaultTypeConverter
      • EnumStringMapper<T>
      • NullableEnumStringMapper<T>
      • TypeConverter
    • Dse.Mapping.Utils
      • MemberInfoExtensions
    • Dse.Metrics
      • DriverMetricsOptions
      • IDriverMetrics
      • IMetric
      • IMetricsRegistry<TMetric>
      • NodeMetric
      • NodeMetric.Counters
      • NodeMetric.Gauges
      • NodeMetric.Meters
      • NodeMetric.Timers
      • SessionMetric
      • SessionMetric.Counters
      • SessionMetric.Gauges
      • SessionMetric.Meters
      • SessionMetric.Timers
    • Dse.Metrics.Abstractions
      • IDriverCounter
      • IDriverGauge
      • IDriverMeter
      • IDriverMetric
      • IDriverMetricsProvider
      • IDriverTimer
    • Dse.Search
      • DateRange
      • DateRangeBound
      • DateRangePrecision
    • Dse.Serialization
      • CustomTypeSerializer<T>
      • TypeSerializer
      • TypeSerializer<T>
      • TypeSerializerDefinitions
      • UdtSerializer

    Class Policies

    Represents the policies configured for a ICluster instance.

    Inheritance
    System.Object
    Policies
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Dse
    Assembly: Dse.dll
    Syntax
    public class Policies

    Constructors

    Policies()

    Declaration
    public Policies()

    Policies(ILoadBalancingPolicy, IReconnectionPolicy, IRetryPolicy)

    Creates a new Policies object using the provided policies.

    Declaration
    public Policies(ILoadBalancingPolicy loadBalancingPolicy, IReconnectionPolicy reconnectionPolicy, IRetryPolicy retryPolicy)
    Parameters
    Type Name Description
    ILoadBalancingPolicy loadBalancingPolicy

    the load balancing policy to use.

    IReconnectionPolicy reconnectionPolicy

    the reconnection policy to use.

    IRetryPolicy retryPolicy

    the retry policy to use.

    Properties

    DefaultLoadBalancingPolicy

    DEPRECATED: Use NewDefaultLoadBalancingPolicy(String) instead. Providing the local datacenter will be mandatory in the next major version of the driver.

    The default load balancing policy.

    The default load balancing policy is DseLoadBalancingPolicy as a wrapper around TokenAwarePolicy with DCAwareRoundRobinPolicy as child policy.

    Declaration
    public static ILoadBalancingPolicy DefaultLoadBalancingPolicy { get; }
    Property Value
    Type Description
    ILoadBalancingPolicy

    DefaultPolicies

    Gets a new instance Policies containing default policies of the driver.

    Declaration
    public static Policies DefaultPolicies { get; }
    Property Value
    Type Description
    Policies

    DefaultReconnectionPolicy

    The default reconnection policy.

    The default reconnection policy is an

    ExponentialReconnectionPolicy where the base delay is 1 second and the max delay is 10 minutes;

    Declaration
    public static IReconnectionPolicy DefaultReconnectionPolicy { get; }
    Property Value
    Type Description
    IReconnectionPolicy

    DefaultRetryPolicy

    The default retry policy.The default retry policy is DefaultRetryPolicy

    Declaration
    public static IRetryPolicy DefaultRetryPolicy { get; }
    Property Value
    Type Description
    IRetryPolicy

    DefaultSpeculativeExecutionPolicy

    The ISpeculativeExecutionPolicy to be used by default.

    The default is NoSpeculativeExecutionPolicy.

    Declaration
    public static ISpeculativeExecutionPolicy DefaultSpeculativeExecutionPolicy { get; }
    Property Value
    Type Description
    ISpeculativeExecutionPolicy

    DefaultTimestampGenerator

    Gets a new instance of the default ITimestampGenerator policy.

    The default ITimestampGenerator is AtomicMonotonicTimestampGenerator

    Declaration
    public static ITimestampGenerator DefaultTimestampGenerator { get; }
    Property Value
    Type Description
    ITimestampGenerator

    LoadBalancingPolicy

    Gets the load balancing policy in use.

    The load balancing policy defines how Cassandra hosts are picked for queries.

    Declaration
    public ILoadBalancingPolicy LoadBalancingPolicy { get; }
    Property Value
    Type Description
    ILoadBalancingPolicy

    ReconnectionPolicy

    Gets the reconnection policy in use.

    The reconnection policy defines how often the driver tries to reconnect to a dead node.

    Declaration
    public IReconnectionPolicy ReconnectionPolicy { get; }
    Property Value
    Type Description
    IReconnectionPolicy

    RetryPolicy

    Gets the retry policy in use.

    The retry policy defines in which conditions a query should be automatically retries by the driver.

    Declaration
    public IRetryPolicy RetryPolicy { get; }
    Property Value
    Type Description
    IRetryPolicy

    SpeculativeExecutionPolicy

    Gets the SpeculativeExecutionPolicy in use.

    Declaration
    public ISpeculativeExecutionPolicy SpeculativeExecutionPolicy { get; }
    Property Value
    Type Description
    ISpeculativeExecutionPolicy

    TimestampGenerator

    Gets the ITimestampGenerator instance in use.

    Declaration
    public ITimestampGenerator TimestampGenerator { get; }
    Property Value
    Type Description
    ITimestampGenerator

    Methods

    NewDefaultLoadBalancingPolicy(String)

    Creates a new instance of the default load balancing policy with the provided local datacenter. This is equivalent to:

    new DseLoadBalancingPolicy(new TokenAwarePolicy(new DCAwareRoundRobinPolicy(localDc)))
    Declaration
    public static ILoadBalancingPolicy NewDefaultLoadBalancingPolicy(string localDc)
    Parameters
    Type Name Description
    System.String localDc
    Returns
    Type Description
    ILoadBalancingPolicy
    Back to top © DataStax, All rights reserved.