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

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

    Inheritance
    System.Object
    Metadata
    Implements
    System.IDisposable
    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 Metadata : IDisposable

    Properties

    ClusterName

    Returns the name of currently connected cluster.

    Declaration
    public string ClusterName { get; }
    Property Value
    Type Description
    System.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
    System.Boolean

    Methods

    AllHosts()

    Returns all known hosts of this cluster.

    Declaration
    public ICollection<Host> AllHosts()
    Returns
    Type Description
    System.Collections.Generic.ICollection<Host>

    collection of all known hosts of this cluster.

    AllReplicas()

    Declaration
    public IEnumerable<IPEndPoint> AllReplicas()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.Net.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
    System.Threading.Tasks.Task<System.Boolean>

    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
    System.String keyspace
    System.String name
    System.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
    System.String keyspace
    System.String name
    System.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
    System.Net.IPEndPoint address
    Returns
    Type Description
    Host

    GetKeyspace(String)

    Returns metadata of specified keyspace.

    Declaration
    public KeyspaceMetadata GetKeyspace(string keyspace)
    Parameters
    Type Name Description
    System.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
    System.Collections.Generic.ICollection<System.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
    System.String keyspace

    name of the keyspace within specified view is defined.

    System.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
    System.Byte[] partitionKey
    Returns
    Type Description
    System.Collections.Generic.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
    System.String keyspaceName
    System.Byte[] partitionKey
    Returns
    Type Description
    System.Collections.Generic.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
    System.String keyspace

    name of the keyspace within specified table is defined.

    System.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
    System.String keyspace

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

    Returns
    Type Description
    System.Collections.Generic.ICollection<System.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
    System.String keyspace
    System.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
    System.String keyspace
    System.String typeName
    Returns
    Type Description
    System.Threading.Tasks.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
    System.String keyspace
    System.String table
    Returns
    Type Description
    System.Boolean

    RefreshSchemaAsync(String, String)

    Updates the keyspace and token information

    Declaration
    public Task<bool> RefreshSchemaAsync(string keyspace = null, string table = null)
    Parameters
    Type Name Description
    System.String keyspace
    System.String table
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    ShutDown(Int32)

    Declaration
    public void ShutDown(int timeoutMs = -1)
    Parameters
    Type Name Description
    System.Int32 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

    System.IDisposable
    Back to top © DataStax, All rights reserved.