com.yahoo.maha.service.datasource.IngestionTimeUpdater.scala Maven / Gradle / Ivy
// Copyright 2017, Yahoo Holdings Inc.
// Licensed under the terms of the Apache License 2.0. Please see LICENSE file in project root for terms.
package com.yahoo.maha.service.datasource
import java.lang
import com.yahoo.maha.core.Engine
/**
* Created by pranavbhole on 06/04/18.
*/
trait IngestionTimeUpdater {
def engine : Engine
def source: String
def getIngestionTime(dataSource: String): Option[String]
def getIngestionTimeLong(dataSource: String): Option[Long]
def getIngestionTimeLongAsJava(dataSource: String): Option[java.lang.Long] = {
getIngestionTimeLong(dataSource).map(lang.Long.valueOf(_))
}
}
case class NoopIngestionTimeUpdater(engine: Engine, source: String) extends IngestionTimeUpdater {
override def getIngestionTime(dataSource: String): Option[String] = None
override def getIngestionTimeLong(dataSource: String): Option[Long] = None
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy