• 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 Metadata

    Keeps metadata on the connected cluster, including known nodes and schema definitions.

    Inheritance
    object
    Metadata
    Implements
    IDisposable
    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 Metadata : IDisposable

    Properties

    ClusterName

    Returns the name of currently connected cluster.

    Declaration
    public string ClusterName { get; }
    Property Value
    Type Description
    string

    the Cassandra name of currently connected cluster.

    IsDbaas

    Determines whether the cluster is provided as a service (DataStax Astra).

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

    Methods

    AllHosts()

    Returns all known hosts of this cluster.

    Declaration
    public ICollection<Host> AllHosts()
    Returns
    Type Description
    ICollection<Host>

    collection of all known hosts of this cluster.

    AllReplicas()

    Declaration
    public IEnumerable<IPEndPoint> AllReplicas()
    Returns
    Type Description
    IEnumerable<IPEndPoint>

    CheckSchemaAgreementAsync()

    Initiates a schema agreement check.

    Schema changes need to be propagated to all nodes in the cluster. Once they have settled on a common version, we say that they are in agreement.

    This method does not perform retries so MaxSchemaAgreementWaitSeconds does not apply.
    Declaration
    public Task<bool> CheckSchemaAgreementAsync()
    Returns
    Type Description
    Task<bool>

    True if schema agreement was successful and false if it was not successful.

    Dispose()

    Declaration
    public void Dispose()

    GetAggregate(string, string, string[])

    Gets the definition associated with a aggregate from Cassandra

    Declaration
    public AggregateMetadata GetAggregate(string keyspace, string name, string[] signature)
    Parameters
    Type Name Description
    string keyspace
    string name
    string[] signature
    Returns
    Type Description
    AggregateMetadata

    The aggregate metadata or null if not found.

    GetFunction(string, string, string[])

    Gets the definition associated with a User Defined Function from Cassandra

    Declaration
    public FunctionMetadata GetFunction(string keyspace, string name, string[] signature)
    Parameters
    Type Name Description
    string keyspace
    string name
    string[] signature
    Returns
    Type Description
    FunctionMetadata

    The function metadata or null if not found.

    GetHost(IPEndPoint)

    Declaration
    public Host GetHost(IPEndPoint address)
    Parameters
    Type Name Description
    IPEndPoint address
    Returns
    Type Description
    Host

    GetKeyspace(string)

    Returns metadata of specified keyspace.

    Declaration
    public KeyspaceMetadata GetKeyspace(string keyspace)
    Parameters
    Type Name Description
    string keyspace

    the name of the keyspace for which metadata should be returned.

    Returns
    Type Description
    KeyspaceMetadata

    the metadata of the requested keyspace or null if * keyspace is not a known keyspace.

    GetKeyspaces()

    Returns a collection of all defined keyspaces names.

    Declaration
    public ICollection<string> GetKeyspaces()
    Returns
    Type Description
    ICollection<string>

    a collection of all defined keyspaces names.

    GetMaterializedView(string, string)

    Returns the view metadata for the provided view name in the keyspace.

    Declaration
    public MaterializedViewMetadata GetMaterializedView(string keyspace, string name)
    Parameters
    Type Name Description
    string keyspace

    name of the keyspace within specified view is defined.

    string name

    name of view.

    Returns
    Type Description
    MaterializedViewMetadata

    a MaterializedViewMetadata for the view in the specified keyspace.

    GetReplicas(byte[])

    Declaration
    public ICollection<Host> GetReplicas(byte[] partitionKey)
    Parameters
    Type Name Description
    byte[] partitionKey
    Returns
    Type Description
    ICollection<Host>

    GetReplicas(string, byte[])

    Get the replicas for a given partition key and keyspace

    Declaration
    public ICollection<Host> GetReplicas(string keyspaceName, byte[] partitionKey)
    Parameters
    Type Name Description
    string keyspaceName
    byte[] partitionKey
    Returns
    Type Description
    ICollection<Host>

    GetTable(string, string)

    Returns TableMetadata for specified table in specified keyspace.

    Declaration
    public TableMetadata GetTable(string keyspace, string tableName)
    Parameters
    Type Name Description
    string keyspace

    name of the keyspace within specified table is defined.

    string tableName

    name of table for which metadata should be returned.

    Returns
    Type Description
    TableMetadata

    a TableMetadata for the specified table in the specified keyspace.

    GetTables(string)

    Returns names of all tables which are defined within specified keyspace.

    Declaration
    public ICollection<string> GetTables(string keyspace)
    Parameters
    Type Name Description
    string keyspace

    the name of the keyspace for which all tables metadata should be returned.

    Returns
    Type Description
    ICollection<string>

    an ICollection of the metadata for the tables defined in this keyspace.

    GetUdtDefinition(string, string)

    Gets the definition associated with a User Defined Type from Cassandra

    Declaration
    public UdtColumnInfo GetUdtDefinition(string keyspace, string typeName)
    Parameters
    Type Name Description
    string keyspace
    string typeName
    Returns
    Type Description
    UdtColumnInfo

    GetUdtDefinitionAsync(string, string)

    Gets the definition associated with a User Defined Type from Cassandra

    Declaration
    public Task<UdtColumnInfo> GetUdtDefinitionAsync(string keyspace, string typeName)
    Parameters
    Type Name Description
    string keyspace
    string typeName
    Returns
    Type Description
    Task<UdtColumnInfo>

    RefreshSchema(string, string)

    Updates the keyspace and token information

    Declaration
    public bool RefreshSchema(string keyspace = null, string table = null)
    Parameters
    Type Name Description
    string keyspace
    string table
    Returns
    Type Description
    bool

    RefreshSchemaAsync(string, string)

    Updates the keyspace and token information

    Declaration
    public Task<bool> RefreshSchemaAsync(string keyspace = null, string table = null)
    Parameters
    Type Name Description
    string keyspace
    string table
    Returns
    Type Description
    Task<bool>

    ShutDown(int)

    Declaration
    public void ShutDown(int timeoutMs = -1)
    Parameters
    Type Name Description
    int timeoutMs

    Events

    HostsEvent

    Declaration
    public event HostsEventHandler HostsEvent
    Event Type
    Type Description
    HostsEventHandler

    SchemaChangedEvent

    Declaration
    public event SchemaChangedEventHandler SchemaChangedEvent
    Event Type
    Type Description
    SchemaChangedEventHandler

    Implements

    IDisposable
    Back to top © DataStax, All rights reserved.