io.quarkus.redis.datasource.timeseries.SeriesSample Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-redis-client Show documentation
Show all versions of quarkus-redis-client Show documentation
Connect to Redis in either imperative or reactive style
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