All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.chrisomeara.pillar.ReportingMigrator.scala Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package com.chrisomeara.pillar

import java.util.Date

import com.datastax.driver.core.Session

class ReportingMigrator(reporter: Reporter, wrapped: Migrator) extends Migrator {
  override def initialize(session: Session, keyspace: String, replicationOptions: ReplicationOptions = ReplicationOptions.default) {
    reporter.initializing(session, keyspace, replicationOptions)
    wrapped.initialize(session, keyspace, replicationOptions)
  }

  override def migrate(session: Session, dateRestriction: Option[Date] = None) {
    reporter.migrating(session, dateRestriction)
    wrapped.migrate(session, dateRestriction)
  }

  override def destroy(session: Session, keyspace: String) {
    reporter.destroying(session, keyspace)
    wrapped.destroy(session, keyspace)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy