• DataStax C# Driver for Apache Cassandra API Documentation
Search Results for

    Show / Hide Table of Contents
    • Cassandra
      • AesColumnEncryptionPolicy
      • AesColumnEncryptionPolicy.AesKeyAndIV
      • AggregateMetadata
      • AlreadyExistsException
      • AtomicMonotonicTimestampGenerator
      • AtomicMonotonicWinApiTimestampGenerator
      • AuthenticationException
      • BaseColumnEncryptionPolicy<TKey>
      • BaseColumnEncryptionPolicy<TKey>.ColMetadataKey
      • BatchStatement
      • BatchType
      • BigIntegerTypeAdapter
      • BoundStatement
      • Builder
      • BusyPoolException
      • CassandraConnectionStringBuilder
      • ClientOptions
      • Cluster
      • ColumnDesc
      • ColumnEncryptionInvalidTypeError
      • ColumnEncryptionMetadata
      • ColumnTypeCode
      • CompressionType
      • Configuration
      • ConsistencyLevel
      • ConstantReconnectionPolicy
      • ConstantSpeculativeExecutionPolicy
      • CqlColumn
      • CqlVector<T>
      • CustomColumnInfo
      • DCAwareRoundRobinPolicy
      • DataCollectionMetadata
      • DataCollectionMetadata.SortOrder
      • DecimalTypeAdapter
      • DefaultLoadBalancingPolicy
      • DefaultRetryPolicy
      • Diagnostics
      • DowngradingConsistencyRetryPolicy
      • DriverException
      • DriverInternalError
      • Duration
      • DynamicCompositeTypeAdapter
      • EC2MultiRegionTranslator
      • EncryptedValue
      • ExecutionException
      • ExecutionInfo
      • ExponentialReconnectionPolicy
      • Extensions
      • FallthroughRetryPolicy
      • FixedReconnectionPolicy
      • FunctionFailureException
      • FunctionMetadata
      • GraphProtocol
      • Host
      • HostDistance
      • HostsEventArgs
      • HostsEventArgs.Kind
      • HostsEventHandler
      • IAddressTranslator
      • IAuthProvider
      • IAuthenticator
      • ICluster
      • IColumnEncryptionPolicy
      • IColumnInfo
      • IExecutionProfile
      • IExecutionProfileBuilder
      • IExecutionProfileOptions
      • IExtendedRetryPolicy
      • IFrameCompressor
      • IInitializer
      • ILoadBalancingPolicy
      • IReconnectionPolicy
      • IReconnectionSchedule
      • IRequestTracker
      • IRetryPolicy
      • ISession
      • ISessionState
      • ISpeculativeExecutionPlan
      • ISpeculativeExecutionPolicy
      • IStatement
      • ITimestampGenerator
      • ITypeAdapter
      • IdempotenceAwareRetryPolicy
      • IndexMetadata
      • IndexMetadata.IndexKind
      • InitFatalErrorException
      • InvalidConfigurationInQueryException
      • InvalidQueryException
      • InvalidTypeException
      • IsBootstrappingException
      • KeyType
      • KeyspaceMetadata
      • ListColumnInfo
      • LocalDate
      • LocalTime
      • Logger
      • LoggingRetryPolicy
      • MapColumnInfo
      • MaterializedViewMetadata
      • Metadata
      • MetadataSyncOptions
      • MetricsExtensions
      • MonitorReportingOptions
      • NoHostAvailableException
      • NoSpeculativeExecutionPolicy
      • NodeRequestInfo
      • NoneAuthProvider
      • NullTypeAdapter
      • OperationTimedOutException
      • OverloadedException
      • PlainTextAuthProvider
      • Policies
      • PoolingOptions
      • PrepareRequest
      • 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
      • SSLOptions
      • SchemaChangedEventArgs
      • SchemaChangedEventArgs.Kind
      • SchemaChangedEventHandler
      • ServerErrorException
      • Session
      • SessionRequestInfo
      • SetColumnInfo
      • SimpleStatement
      • SocketOptions
      • Statement
      • SyntaxError
      • TableColumn
      • TableMetadata
      • TableOptions
      • TimeUuid
      • ToManyConnectionsPerHost
      • TokenAwarePolicy
      • TraceRetrievalException
      • TruncateException
      • TupleColumnInfo
      • TypeAdapters
      • UdtColumnInfo
      • UdtMap
      • UdtMap<T>
      • UdtMappingDefinitions
      • UnauthorizedException
      • UnavailableException
      • Unset
      • VectorColumnInfo
      • WriteFailureException
      • WriteTimeoutException
    • Cassandra.AppMetrics
      • DriverAppMetricsOptions
    • Cassandra.AppMetrics.MetricTypes
      • IAppMetricsCounter
      • IAppMetricsGauge
      • IAppMetricsMeter
      • IAppMetricsMetric
      • IAppMetricsTimer
    • Cassandra.AppMetrics.MetricValues
      • IAppMetricsHistogramValue
      • IAppMetricsMeterValue
      • IAppMetricsMetricWithValue<T>
      • IAppMetricsTimerValue
    • Cassandra.Data
      • CqlBatchTransaction
      • CqlCommand
      • CqlConnection
      • CqlDataAdapter
      • CqlParameter
      • CqlParameterCollection
      • CqlProviderFactory
      • CqlReader
    • Cassandra.Data.Linq
      • AllowFilteringAttribute
      • Batch
      • ClusteringKeyAttribute
      • ColumnAttribute
      • CompactStorageAttribute
      • CounterAttribute
      • CqlArgumentException
      • CqlCommand
      • CqlConditionalCommand<TEntity>
      • CqlDelete
      • CqlFunction
      • CqlInsert<TEntity>
      • CqlLinqNotSupportedException
      • CqlOperator
      • CqlQueryBase<TEntity>
      • CqlQueryExtensions
      • CqlQuerySingleElement<TEntity>
      • CqlQuery<TEntity>
      • CqlScalar<TEntity>
      • CqlToken
      • CqlUpdate
      • ITable
      • IgnoreAttribute
      • PartitionKeyAttribute
      • SecondaryIndexAttribute
      • SessionExtensions
      • StaticColumnAttribute
      • TableAttribute
      • TableType
      • Table<TEntity>
    • Cassandra.DataStax.Auth
      • DseGssapiAuthProvider
      • DsePlainTextAuthProvider
    • Cassandra.DataStax.Auth.Sspi
      • SspiException
    • Cassandra.DataStax.Graph
      • Direction
      • Edge
      • Element
      • ElementMap
      • EnumWrapper
      • FluentGraphStatement
      • GraphNode
      • GraphOptions
      • GraphResultSet
      • GraphStatement
      • IEdge
      • IElement
      • IGraphNode
      • IGraphStatement
      • IPath
      • IProperty
      • IPropertyWithElement
      • IVertex
      • IVertexProperty
      • Path
      • SimpleGraphStatement
      • TEnum
      • Traverser
      • Vertex
    • Cassandra.DataStax.Graph.Internal
      • IGraphSONDeserializer
      • IGraphSONReader
      • IGraphSONSerializer
      • IGraphSONWriter
    • Cassandra.DataStax.Search
      • DateRange
      • DateRangeBound
      • DateRangePrecision
    • Cassandra.Geometry
      • GeometryBase
      • LineString
      • Point
      • Polygon
    • Cassandra.Mapping
      • AppliedInfo<T>
      • ColumnMap
      • Cql
      • CqlQueryOptions
      • IColumnDefinition
      • ICqlBatch
      • ICqlQueryAsyncClient
      • ICqlQueryClient
      • ICqlWriteAsyncClient
      • ICqlWriteClient
      • IMapper
      • IPage<T>
      • ITypeDefinition
      • Map<TPoco>
      • Mapper
      • MappingConfiguration
      • Mappings
      • PrimaryKeyAttribute
      • SortOrder
      • TableNameAttribute
    • Cassandra.Mapping.Attributes
      • ClusteringKeyAttribute
      • ColumnAttribute
      • CounterAttribute
      • FrozenAttribute
      • FrozenKeyAttribute
      • FrozenValueAttribute
      • IgnoreAttribute
      • PartitionKeyAttribute
      • SecondaryIndexAttribute
      • StaticColumnAttribute
      • TableAttribute
    • Cassandra.Mapping.TypeConversion
      • DefaultTypeConverter
      • EnumStringMapper<T>
      • NullableEnumStringMapper<T>
      • TypeConverter
    • Cassandra.Mapping.Utils
      • MemberInfoExtensions
    • Cassandra.Metrics
      • DriverMetricsOptions
      • IDriverMetrics
      • IMetric
      • IMetricsRegistry<TMetric>
      • NodeMetric
      • NodeMetric.Counters
      • NodeMetric.Gauges
      • NodeMetric.Meters
      • NodeMetric.Timers
      • SessionMetric
      • SessionMetric.Counters
      • SessionMetric.Gauges
      • SessionMetric.Meters
      • SessionMetric.Timers
    • Cassandra.Metrics.Abstractions
      • IDriverCounter
      • IDriverGauge
      • IDriverMeter
      • IDriverMetric
      • IDriverMetricsProvider
      • IDriverTimer
    • Cassandra.OpenTelemetry
      • BuilderExtensions
      • CassandraActivitySourceHelper
      • CassandraInstrumentationOptions
      • OpenTelemetryRequestTracker
    • Cassandra.Serialization
      • CustomTypeSerializer<T>
      • TypeSerializer
      • TypeSerializerDefinitions
      • TypeSerializer<T>
      • UdtSerializer
    • Cassandra.Serialization.Primitive
      • DecimalSerializer

    Class ProtocolOptions

    Options of the Cassandra native binary protocol.

    Inheritance
    object
    ProtocolOptions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Cassandra
    Assembly: Cassandra.dll
    Syntax
    public class ProtocolOptions

    Constructors

    ProtocolOptions()

    Creates a new ProtocolOptions instance using the DEFAULT_PORT.

    Declaration
    public ProtocolOptions()

    ProtocolOptions(int)

    Creates a new ProtocolOptions instance using the provided port.

    Declaration
    public ProtocolOptions(int port)
    Parameters
    Type Name Description
    int port

    the port to use for the binary protocol.

    ProtocolOptions(int, SSLOptions)

    Creates a new ProtocolOptions instance using the provided port and SSL context.

    Declaration
    public ProtocolOptions(int port, SSLOptions sslOptions)
    Parameters
    Type Name Description
    int port

    the port to use for the binary protocol.

    SSLOptions sslOptions

    sslOptions the SSL options to use. Use null if SSL is not to be used.

    Fields

    DefaultMaxSchemaAgreementWaitSeconds

    The default value for MaxSchemaAgreementWaitSeconds.get: 10.

    Declaration
    public const int DefaultMaxSchemaAgreementWaitSeconds = 10
    Field Value
    Type Description
    int

    DefaultPort

    The default port for Cassandra native binary protocol: 9042.

    Declaration
    public const int DefaultPort = 9042
    Field Value
    Type Description
    int

    Properties

    Compression

    Returns the compression used by the protocol.

    The default compression is Compression.SNAPPY.

    Declaration
    public CompressionType Compression { get; }
    Property Value
    Type Description
    CompressionType

    the compression used.

    CustomCompressor

    Gets the custom compressor specified to be used for the compression type.

    Declaration
    public IFrameCompressor CustomCompressor { get; }
    Property Value
    Type Description
    IFrameCompressor

    MaxProtocolVersion

    Gets the maximum protocol version to be used. When set, it limits the maximum protocol version used to connect to the nodes. Useful for using the driver against a cluster that contains nodes with different major/minor versions of Cassandra.

    Declaration
    public byte? MaxProtocolVersion { get; }
    Property Value
    Type Description
    byte?

    MaxSchemaAgreementWaitSeconds

    Gets the maximum time to wait for schema agreement before returning from a DDL query.

    Declaration
    public int MaxSchemaAgreementWaitSeconds { get; }
    Property Value
    Type Description
    int

    NoCompact

    Determines whether NO_COMPACT is enabled as 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+.

    Declaration
    public bool NoCompact { get; }
    Property Value
    Type Description
    bool

    Port

    The port used to connect to the Cassandra hosts.

    Declaration
    public int Port { get; }
    Property Value
    Type Description
    int

    the port used to connect to the Cassandra hosts.

    SslOptions

    Specified SSL options used to connect to the Cassandra hosts.

    Declaration
    public SSLOptions SslOptions { get; }
    Property Value
    Type Description
    SSLOptions

    SSL options used to connect to the Cassandra hosts.

    Methods

    SetCompression(CompressionType)

    Sets the compression to use.

    Note that while this setting can be changed at any time, it will only apply to newly created connections.

    Declaration
    public ProtocolOptions SetCompression(CompressionType compression)
    Parameters
    Type Name Description
    CompressionType compression

    the compression algorithm to use (or Compression.NONE to disable compression).

    Returns
    Type Description
    ProtocolOptions

    this ProtocolOptions object.

    SetCustomCompressor(IFrameCompressor)

    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.

    Declaration
    public ProtocolOptions SetCustomCompressor(IFrameCompressor compressor)
    Parameters
    Type Name Description
    IFrameCompressor compressor

    Implementation of IFrameCompressor

    Returns
    Type Description
    ProtocolOptions

    SetMaxProtocolVersion(ProtocolVersion)

    Sets the maximum protocol version to be used. When set, it limits the maximum protocol version used to connect to the nodes. Useful for using the driver against a cluster that contains nodes with different major/minor versions of Cassandra.

    Declaration
    public ProtocolOptions SetMaxProtocolVersion(ProtocolVersion value)
    Parameters
    Type Name Description
    ProtocolVersion value
    Returns
    Type Description
    ProtocolOptions

    SetMaxProtocolVersion(byte)

    Sets the maximum protocol version to be used. When set, it limits the maximum protocol version used to connect to the nodes. Useful for using the driver against a cluster that contains nodes with different major/minor versions of Cassandra.

    Declaration
    public ProtocolOptions SetMaxProtocolVersion(byte value)
    Parameters
    Type Name Description
    byte value
    Returns
    Type Description
    ProtocolOptions

    SetMaxSchemaAgreementWaitSeconds(int)

    Sets the maximum time to wait for schema agreement before returning from a DDL query.

    Declaration
    public ProtocolOptions SetMaxSchemaAgreementWaitSeconds(int value)
    Parameters
    Type Name Description
    int value
    Returns
    Type Description
    ProtocolOptions

    SetNoCompact(bool)

    When set to true, it 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+.

    Declaration
    public ProtocolOptions SetNoCompact(bool value)
    Parameters
    Type Name Description
    bool value
    Returns
    Type Description
    ProtocolOptions
    Back to top © DataStax, All rights reserved.