C# 클래스 CqlSharp.Network.Connection

A single connection to a Cassandra node.
파일 보기 프로젝트 열기: reuzel/CqlSharp 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AuthenticateAsync Task
Close void
ConnectAsync Task
Disconnect void
NegotiateConnectionOptionsAsync Task
OpenAsyncInternal Task
ProcessEvent void
ReadFramesAsync void
SendRequestAsyncComplex Task
SendRequestAsyncInternal Task
StartupAsync Task
UpdateLoad void

공개 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
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

메소드 상세

Connection() 공개 메소드

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

Dispose() 공개 메소드

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

OpenAsync() 공개 메소드

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

RegisterForClusterChangesAsync() 공개 메소드

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
리턴 Task

SendRequestAsync() 공개 메소드

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.
리턴 Task

ToString() 공개 메소드

Returns a System.String that represents this instance.
public ToString ( ) : string
리턴 string