C# 클래스 CqlSharp.CqlConnection

A connection to a Cassandra cluster
상속: IDisposable
파일 보기 프로젝트 열기: reuzel/CqlSharp 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CompleteOpen void
CqlConnection System
GetConnection Connection
OpenAsyncInternal Task
OpenAsyncInternal2 Task

공개 메소드들

메소드 설명
BeginTransaction ( ) : CqlBatchTransaction

Begins the transaction.

BeginTransaction ( IsolationLevel isolationLevel ) : CqlBatchTransaction

Begins the transaction.

Cancel ( ) : void

Cancels any ongoing open operation.

ChangeDatabase ( string databaseName ) : void

Changes the current database for an open connection.

Close ( ) : void

Closes the connection to the database. This is the preferred method of closing any open connection.

CqlConnection ( CqlConnectionStringBuilder config ) : System

Initializes a new instance of the CqlConnection class.

CqlConnection ( string connectionString ) : System

Initializes a new instance of the CqlConnection class.

CreateCqlCommand ( ) : CqlCommand

Creates and returns a T:CqlSharp.CqlCommand object associated with the current connection.

Open ( ) : void

Opens a database connection with the settings specified by the .

OpenAsync ( CancellationToken cancellationToken ) : Task

This is the asynchronous version of M:System.Data.Common.DbConnection.Open. The cancellation token can optionally be honored.The default implementation invokes the synchronous call and returns a completed task. The default implementation will return a cancelled task if passed an already cancelled cancellationToken. Exceptions thrown by Open will be communicated via the returned Task Exception property.Do not invoke other methods and properties of the DbConnection object until the returned Task is complete.

OpenInternal ( ) : void

Opens the connection with full cancellation support.

SetConnectionTimeout ( int timeout ) : void

Sets the connection timeout.

Shutdown ( string connectionString ) : void

Shutdowns all interaction with the cluster as specified by the connection string.

This will close all open connection, and thereby fail all ongoing cql operations.

ShutdownAll ( ) : void

Shutdowns all interactions with all known clusters

This will close all open connection, and thereby fail all ongoing cql operations.

보호된 메소드들

메소드 설명
BeginDbTransaction ( IsolationLevel isolationLevel ) : DbTransaction

Starts a database transaction.

CreateDbCommand ( ) : DbCommand

Creates and returns a T:System.Data.Common.DbCommand object associated with the current connection.

Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the T:System.ComponentModel.Component and optionally releases the managed resources.

비공개 메소드들

메소드 설명
CompleteOpen ( Logger logger ) : void
CqlConnection ( ) : System

Initializes the CqlConnection class.

GetConnection ( PartitionKey partitionKey = default(PartitionKey) ) : Connection

Requests a connection to be used for a command. Will reuse connection level connection if available

OpenAsyncInternal ( CancellationToken cancellationToken ) : Task

Opens the connection.

OpenAsyncInternal2 ( Logger logger, CancellationToken cancellationToken ) : Task

Opens the connection.

메소드 상세

BeginDbTransaction() 보호된 메소드

Starts a database transaction.
protected BeginDbTransaction ( IsolationLevel isolationLevel ) : DbTransaction
isolationLevel IsolationLevel Specifies the isolation level for the transaction.
리턴 DbTransaction

BeginTransaction() 공개 메소드

Begins the transaction.
public BeginTransaction ( ) : CqlBatchTransaction
리턴 CqlBatchTransaction

BeginTransaction() 공개 메소드

Begins the transaction.
public BeginTransaction ( IsolationLevel isolationLevel ) : CqlBatchTransaction
isolationLevel IsolationLevel The isolation level.
리턴 CqlBatchTransaction

Cancel() 공개 메소드

Cancels any ongoing open operation.
public Cancel ( ) : void
리턴 void

ChangeDatabase() 공개 메소드

Changes the current database for an open connection.
/// CqlConnection must be open before Database can be changed. /// or /// Changing a database is only supported with a ConnectionStrategy that offers exclusive connections ///
public ChangeDatabase ( string databaseName ) : void
databaseName string Specifies the name of the database for the connection to use.
리턴 void

Close() 공개 메소드

Closes the connection to the database. This is the preferred method of closing any open connection.
public Close ( ) : void
리턴 void

CqlConnection() 공개 메소드

Initializes a new instance of the CqlConnection class.
public CqlConnection ( CqlConnectionStringBuilder config ) : System
config CqlConnectionStringBuilder The config.
리턴 System

CqlConnection() 공개 메소드

Initializes a new instance of the CqlConnection class.
public CqlConnection ( string connectionString ) : System
connectionString string The connection string.
리턴 System

CreateCqlCommand() 공개 메소드

Creates and returns a T:CqlSharp.CqlCommand object associated with the current connection.
public CreateCqlCommand ( ) : CqlCommand
리턴 CqlCommand

CreateDbCommand() 보호된 메소드

Creates and returns a T:System.Data.Common.DbCommand object associated with the current connection.
protected CreateDbCommand ( ) : DbCommand
리턴 DbCommand

Dispose() 보호된 메소드

Releases the unmanaged resources used by the T:System.ComponentModel.Component and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool /// true to release both managed and unmanaged resources; false to release only unmanaged /// resources. ///
리턴 void

Open() 공개 메소드

Opens a database connection with the settings specified by the .
public Open ( ) : void
리턴 void

OpenAsync() 공개 메소드

This is the asynchronous version of M:System.Data.Common.DbConnection.Open. The cancellation token can optionally be honored.The default implementation invokes the synchronous call and returns a completed task. The default implementation will return a cancelled task if passed an already cancelled cancellationToken. Exceptions thrown by Open will be communicated via the returned Task Exception property.Do not invoke other methods and properties of the DbConnection object until the returned Task is complete.
Connection must be closed before it is opened
public OpenAsync ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken The cancellation instruction.
리턴 Task

OpenInternal() 공개 메소드

Opens the connection with full cancellation support.
CqlConnection Open has been aborted by user CqlConnection.Open timed out.
public OpenInternal ( ) : void
리턴 void

SetConnectionTimeout() 공개 메소드

Sets the connection timeout.
public SetConnectionTimeout ( int timeout ) : void
timeout int The timeout in seconds
리턴 void

Shutdown() 공개 정적인 메소드

Shutdowns all interaction with the cluster as specified by the connection string.
This will close all open connection, and thereby fail all ongoing cql operations.
public static Shutdown ( string connectionString ) : void
connectionString string The connection string.
리턴 void

ShutdownAll() 공개 정적인 메소드

Shutdowns all interactions with all known clusters
This will close all open connection, and thereby fail all ongoing cql operations.
public static ShutdownAll ( ) : void
리턴 void