In this chapter, we learned how to develop applications using the Java driver to communicate with Cassandra. Throughout the chapter, we studied the various classes that are used to create a connection with a Cassandra cluster and execute queries. We looked at a lot of helper methods that can be used to configure a Cassandra connection and query execution.
To begin with, we started by using the Cluster API to create a Cluster object, which is the entry point to the Cassandra cluster. We used methods to set the initial contact points to create a Cassandra cluster connection and return an instance of the Cluster object. We then proceeded with creating an instance of Session, which is used to execute queries. Executed queries return the results as a ResultSet object. A ResultSet object implements Iterable <Row>, which can be looped over to fetch individual rows. Then, we wrote a couple of programs...