Class Session
Inheritance
System.Object
Session
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 Session : IInternalSession, ISession, IDisposable
Properties
BinaryProtocolVersion
Declaration
public int BinaryProtocolVersion { get; }
Property Value
Type |
Description |
System.Int32 |
|
Cluster
Declaration
public ICluster Cluster { get; }
Property Value
Configuration
Gets the cluster configuration
Declaration
public Configuration Configuration { get; protected set; }
Property Value
IsDisposed
Determines if the session is already disposed
Declaration
public bool IsDisposed { get; }
Property Value
Type |
Description |
System.Boolean |
|
Keyspace
Gets or sets the keyspace
Declaration
public string Keyspace { get; }
Property Value
Type |
Description |
System.String |
|
Policies
Declaration
public Policies Policies { get; }
Property Value
SessionName
Declaration
public string SessionName { get; }
Property Value
Type |
Description |
System.String |
|
UserDefinedTypes
Declaration
public UdtMappingDefinitions UserDefinedTypes { get; }
Property Value
Methods
BeginExecute(IStatement, AsyncCallback, Object)
Declaration
public IAsyncResult BeginExecute(IStatement statement, AsyncCallback callback, object state)
Parameters
Type |
Name |
Description |
IStatement |
statement |
|
System.AsyncCallback |
callback |
|
System.Object |
state |
|
Returns
Type |
Description |
System.IAsyncResult |
|
BeginExecute(String, ConsistencyLevel, AsyncCallback, Object)
Declaration
public IAsyncResult BeginExecute(string cqlQuery, ConsistencyLevel consistency, AsyncCallback callback, object state)
Parameters
Type |
Name |
Description |
System.String |
cqlQuery |
|
ConsistencyLevel |
consistency |
|
System.AsyncCallback |
callback |
|
System.Object |
state |
|
Returns
Type |
Description |
System.IAsyncResult |
|
BeginPrepare(String, AsyncCallback, Object)
Declaration
public IAsyncResult BeginPrepare(string cqlQuery, AsyncCallback callback, object state)
Parameters
Type |
Name |
Description |
System.String |
cqlQuery |
|
System.AsyncCallback |
callback |
|
System.Object |
state |
|
Returns
Type |
Description |
System.IAsyncResult |
|
ChangeKeyspace(String)
Declaration
public void ChangeKeyspace(string keyspace)
Parameters
Type |
Name |
Description |
System.String |
keyspace |
|
CreateKeyspace(String, Dictionary<String, String>, Boolean)
Declaration
public void CreateKeyspace(string keyspace, Dictionary<string, string> replication = null, bool durableWrites = true)
Parameters
Type |
Name |
Description |
System.String |
keyspace |
|
System.Collections.Generic.Dictionary<System.String, System.String> |
replication |
|
System.Boolean |
durableWrites |
|
CreateKeyspaceIfNotExists(String, Dictionary<String, String>, Boolean)
Declaration
public void CreateKeyspaceIfNotExists(string keyspaceName, Dictionary<string, string> replication = null, bool durableWrites = true)
Parameters
Type |
Name |
Description |
System.String |
keyspaceName |
|
System.Collections.Generic.Dictionary<System.String, System.String> |
replication |
|
System.Boolean |
durableWrites |
|
DeleteKeyspace(String)
Declaration
public void DeleteKeyspace(string keyspaceName)
Parameters
Type |
Name |
Description |
System.String |
keyspaceName |
|
DeleteKeyspaceIfExists(String)
Declaration
public void DeleteKeyspaceIfExists(string keyspaceName)
Parameters
Type |
Name |
Description |
System.String |
keyspaceName |
|
Dispose()
Declaration
EndExecute(IAsyncResult)
Declaration
public RowSet EndExecute(IAsyncResult ar)
Parameters
Type |
Name |
Description |
System.IAsyncResult |
ar |
|
Returns
EndPrepare(IAsyncResult)
Declaration
public PreparedStatement EndPrepare(IAsyncResult ar)
Parameters
Type |
Name |
Description |
System.IAsyncResult |
ar |
|
Returns
Execute(IStatement)
Declaration
public RowSet Execute(IStatement statement)
Parameters
Returns
Execute(IStatement, String)
Declaration
public RowSet Execute(IStatement statement, string executionProfileName)
Parameters
Type |
Name |
Description |
IStatement |
statement |
|
System.String |
executionProfileName |
|
Returns
Execute(String)
Declaration
public RowSet Execute(string cqlQuery)
Parameters
Type |
Name |
Description |
System.String |
cqlQuery |
|
Returns
Execute(String, ConsistencyLevel)
Declaration
public RowSet Execute(string cqlQuery, ConsistencyLevel consistency)
Parameters
Returns
Execute(String, Int32)
Declaration
public RowSet Execute(string cqlQuery, int pageSize)
Parameters
Type |
Name |
Description |
System.String |
cqlQuery |
|
System.Int32 |
pageSize |
|
Returns
Execute(String, String)
Declaration
public RowSet Execute(string cqlQuery, string executionProfileName)
Parameters
Type |
Name |
Description |
System.String |
cqlQuery |
|
System.String |
executionProfileName |
|
Returns
ExecuteAsync(IStatement)
Declaration
public Task<RowSet> ExecuteAsync(IStatement statement)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<RowSet> |
|
ExecuteAsync(IStatement, String)
Declaration
public Task<RowSet> ExecuteAsync(IStatement statement, string executionProfileName)
Parameters
Type |
Name |
Description |
IStatement |
statement |
|
System.String |
executionProfileName |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<RowSet> |
|
GetMetrics()
Declaration
public IDriverMetrics GetMetrics()
Returns
Prepare(String)
Declaration
public PreparedStatement Prepare(string cqlQuery)
Parameters
Type |
Name |
Description |
System.String |
cqlQuery |
|
Returns
Prepare(String, IDictionary<String, Byte[]>)
Declaration
public PreparedStatement Prepare(string cqlQuery, IDictionary<string, byte[]> customPayload)
Parameters
Type |
Name |
Description |
System.String |
cqlQuery |
|
System.Collections.Generic.IDictionary<System.String, System.Byte[]> |
customPayload |
|
Returns
Prepare(String, String)
Declaration
public PreparedStatement Prepare(string cqlQuery, string keyspace)
Parameters
Type |
Name |
Description |
System.String |
cqlQuery |
|
System.String |
keyspace |
|
Returns
Prepare(String, String, IDictionary<String, Byte[]>)
Declaration
public PreparedStatement Prepare(string cqlQuery, string keyspace, IDictionary<string, byte[]> customPayload)
Parameters
Type |
Name |
Description |
System.String |
cqlQuery |
|
System.String |
keyspace |
|
System.Collections.Generic.IDictionary<System.String, System.Byte[]> |
customPayload |
|
Returns
PrepareAsync(String)
Declaration
public Task<PreparedStatement> PrepareAsync(string query)
Parameters
Type |
Name |
Description |
System.String |
query |
|
Returns
PrepareAsync(String, IDictionary<String, Byte[]>)
Declaration
public Task<PreparedStatement> PrepareAsync(string query, IDictionary<string, byte[]> customPayload)
Parameters
Type |
Name |
Description |
System.String |
query |
|
System.Collections.Generic.IDictionary<System.String, System.Byte[]> |
customPayload |
|
Returns
PrepareAsync(String, String)
Declaration
public Task<PreparedStatement> PrepareAsync(string cqlQuery, string keyspace)
Parameters
Type |
Name |
Description |
System.String |
cqlQuery |
|
System.String |
keyspace |
|
Returns
PrepareAsync(String, String, IDictionary<String, Byte[]>)
Declaration
public Task<PreparedStatement> PrepareAsync(string cqlQuery, string keyspace, IDictionary<string, byte[]> customPayload)
Parameters
Type |
Name |
Description |
System.String |
cqlQuery |
|
System.String |
keyspace |
|
System.Collections.Generic.IDictionary<System.String, System.Byte[]> |
customPayload |
|
Returns
WaitForSchemaAgreement(RowSet)
Declaration
public void WaitForSchemaAgreement(RowSet rs)
Parameters
Type |
Name |
Description |
RowSet |
rs |
|
WaitForSchemaAgreement(IPEndPoint)
Declaration
public bool WaitForSchemaAgreement(IPEndPoint hostAddress)
Parameters
Type |
Name |
Description |
System.Net.IPEndPoint |
hostAddress |
|
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IDisposable
Extension Methods