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

redis.clients.jedis.timeseries.TSMRangeElements Maven / Gradle / Ivy

The newest version!
package redis.clients.jedis.timeseries;

import java.util.List;
import java.util.Map;
import redis.clients.jedis.util.KeyValue;

public class TSMRangeElements extends KeyValue> {

  private final Map labels;
  private final List aggregators;
  private final List reducers;
  private final List sources;

  public TSMRangeElements(String key, Map labels, List value) {
    super(key, value);
    this.labels = labels;
    this.aggregators = null;
    this.reducers = null;
    this.sources = null;
  }

  public TSMRangeElements(String key, Map labels, List aggregators, List value) {
    super(key, value);
    this.labels = labels;
    this.aggregators = aggregators;
    this.reducers = null;
    this.sources = null;
  }

  public TSMRangeElements(String key, Map labels, List reducers, List sources, List value) {
    super(key, value);
    this.labels = labels;
    this.aggregators = null;
    this.reducers = reducers;
    this.sources = sources;
  }

  public Map getLabels() {
    return labels;
  }

  public List getAggregators() {
    return aggregators;
  }

  public List getReducers() {
    return reducers;
  }

  public List getSources() {
    return sources;
  }

  public List getElements() {
    return getValue();
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder().append(getClass().getSimpleName())
        .append("{key=").append(getKey()).append(", labels=").append(labels);
    if (aggregators != null) {
      sb.append(", aggregators=").append(aggregators);
    }
    if (reducers != null && sources != null) {
      sb.append(", reducers").append(reducers).append(", sources").append(sources);
    }
    return sb.append(", elements=").append(getElements()).append('}').toString();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy