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

io.quarkus.redis.datasource.timeseries.SeriesSample Maven / Gradle / Ivy

There is a newer version: 3.17.5
Show newest version
package io.quarkus.redis.datasource.timeseries;

/**
 * Represents a sample to be added to a specific time series {@code key}
 */
public class SeriesSample extends Sample {

    public final K key;

    public SeriesSample(K key, long timestamp, double value) {
        super(timestamp, value);
        this.key = key;
    }

    public static  SeriesSample from(K k, long ts, double val) {
        return new SeriesSample<>(k, ts, val);
    }

    public static  SeriesSample from(K k, double val) {
        return new SeriesSample<>(k, Long.MAX_VALUE, val);
    }

    public K key() {
        return key;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy