/// <summary> /// Creates a new session on this cluster and using a keyspace an existing keyspace. /// </summary> /// <param name="keyspace">Case-sensitive keyspace name to use</param> public ISession Connect(string keyspace) { Init(); var session = new Session(this, Configuration, keyspace, _serializer); session.Init(); _connectedSessions.Add(session); _logger.Info("Session connected ({0})", session.GetHashCode()); return(session); }
/// <summary> /// Creates a new session on this cluster and using a keyspace an existing keyspace. /// </summary> /// <param name="keyspace">Case-sensitive keyspace name to use</param> public async Task <ISession> ConnectAsync(string keyspace) { await Init().ConfigureAwait(false); var session = new Session(this, Configuration, keyspace, _serializer); await session.Init().ConfigureAwait(false); _connectedSessions.Add(session); _logger.Info("Session connected ({0})", session.GetHashCode()); return(session); }
/// <summary> /// Creates a new session on this cluster and using a keyspace an existing keyspace. /// </summary> /// <param name="keyspace">Case-sensitive keyspace name to use</param> public ISession Connect(string keyspace) { Init(); var session = new Session(this, Configuration, keyspace, _protocolVersion); session.Init(); _connectedSessions.Add(session); _logger.Info("Session connected ({0})", session.GetHashCode()); return session; }