C# Class CqlSharp.Network.Connection

A single connection to a Cassandra node.
Afficher le fichier Open project: reuzel/CqlSharp Class Usage Examples

Private Properties

Свойство Type Description
AuthenticateAsync Task
Close void
ConnectAsync Task
Disconnect void
NegotiateConnectionOptionsAsync Task
OpenAsyncInternal Task
ProcessEvent void
ReadFramesAsync void
SendRequestAsyncComplex Task
SendRequestAsyncInternal Task
StartupAsync Task
UpdateLoad void

Méthodes publiques

Méthode Description
Connection ( Node node, int nr ) : System

Initializes a new instance of the Connection class.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

OpenAsync ( Logger logger ) : Task

Opens the connection. The actual open sequence will be executed at most once.

RegisterForClusterChangesAsync ( Logger logger ) : Task

Registers for cluster changes.

SendRequestAsync ( Frame frame, Logger logger, int load, CancellationToken token ) : Task

Submits a frame, and waits until response is received

ToString ( ) : string

Returns a System.String that represents this instance.

Private Methods

Méthode Description
AuthenticateAsync ( AuthenticateFrame auth, Logger logger ) : Task

Authenticates the connection.

Close ( bool failed ) : void

Closes this connection and moves it into closed state

ConnectAsync ( ) : Task

Creates an underlying TCP connection

Disconnect ( ) : void

Closes the TCP connection underlying this connection if any

NegotiateConnectionOptionsAsync ( Logger logger ) : Task

Negotiates the connection options.

OpenAsyncInternal ( Logger logger ) : Task

Opens the connection. Called once per connection only

ProcessEvent ( EventFrame frame ) : void

Processes the event frame.

ReadFramesAsync ( ) : void

Starts a readloop

SendRequestAsyncComplex ( Frame frame, Logger logger, int load, CancellationToken token ) : Task

Submits a frame, and waits until response is received (complex version)

SendRequestAsyncInternal ( Frame frame, Logger logger, int load, CancellationToken token ) : Task

Sends the request async internal. Cancellation supported until request is send, after which answer must be handled to avoid connection corruption.

StartupAsync ( Logger logger ) : Task

Startups the connection using the required message exchange

UpdateLoad ( int load, Logger logger ) : void

Updates the load of this connection, and will trigger a corresponding event

Method Details

Connection() public méthode

Initializes a new instance of the Connection class.
public Connection ( Node node, int nr ) : System
node Node The node.
nr int The connection nr.
Résultat System

Dispose() public méthode

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Résultat void

OpenAsync() public méthode

Opens the connection. The actual open sequence will be executed at most once.
public OpenAsync ( Logger logger ) : Task
logger Logger
Résultat Task

RegisterForClusterChangesAsync() public méthode

Registers for cluster changes.
Must be connected before Registration can take place Could not register for cluster changes!
public RegisterForClusterChangesAsync ( Logger logger ) : Task
logger Logger
Résultat Task

SendRequestAsync() public méthode

Submits a frame, and waits until response is received
public SendRequestAsync ( Frame frame, Logger logger, int load, CancellationToken token ) : Task
frame CqlSharp.Protocol.Frame The frame to send.
logger Logger logger to write progress to
load int the load indication of the request. Used for balancing queries over nodes and connections
token System.Threading.CancellationToken The token.
Résultat Task

ToString() public méthode

Returns a System.String that represents this instance.
public ToString ( ) : string
Résultat string