datastax/csharp-driver — pull request #22 by teddymaef (2014-03-27 07:39:53+00:00)
Title: Make creation of Cluster and Session in CqlConnection be virtual

The current creation logic of Cluster and Session in CqlConnection is private and could not be extended at all. But it is not flexible enough for performance tuning.

Or, simply speaking, the current implementation of CqlConnection makes any command execution be quite slow, because every CqlConnection instance's Open() creates an instance of Session, and Close() disposes it.

The flexibility for child classes of CqlConnection class to manage the life cycle of Cluster, Session and PreparedStatement instances and to cache these instances are really necessary for better performance.

The purpose of this pull request is to make the creation of Cluster, Session and PreparedStatement in the CqlConnection be virtual so that their creation and caching logic could be customized.