Class CassandraDb

java.lang.Object
kieker.extension.cassandra.writer.CassandraDb

public class CassandraDb extends Object
Since:
1.16
Author:
Armin Moebius, Sven Ulrich, Reiner Jung
  • Constructor Details

    • CassandraDb

      public CassandraDb(String keyspace, List<InetSocketAddress> contactPoints, String tablePrefix, boolean dropTables)
      Creates a new instance of this class using the given parameter.
      Parameters:
      keyspace -
      contactPoints -
      tablePrefix -
      dropTables -
  • Method Details

    • connect

      public boolean connect()
      Establishes a connection to the database.
      Returns:
      true when the connection could be established
    • disconnect

      public void disconnect()
      Closes all open connections to the database.
    • insert

      public void insert(IMonitoringRecord record, String benchmarkId) throws MonitoringRecordException
      Insert a record into the database.
      Parameters:
      record - the record
      benchmarkId - the current benchmarkId
      Throws:
      MonitoringRecordException - failed to insert the record or creating and registring the record table in the first place.
    • getBoundStatement

      public com.datastax.oss.driver.api.core.cql.BoundStatement getBoundStatement(com.datastax.oss.driver.api.core.cql.PreparedStatement statement)
      Returns a BoundStatement from the given String. Uses the default Session to the keyspace.
      Parameters:
      statement -
      Returns:
      bound statement