com.infobip.kafkistry.recordstructure.ProcessingContext.kt Maven / Gradle / Ivy
package com.infobip.kafkistry.recordstructure
open class ProcessingContext(
val properties: RecordAnalyzerProperties,
val now: Long = generateTimestamp(),
) {
private val timeWindow: Long get() = properties.timeWindow
fun wrapNow(value: T) = TimestampWrapper(value, now)
fun Long.tooOld() = this < now - timeWindow
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy