![JAR search and dependency download from the Maven repository](/logo.png)
com.arangodb.model.QueueTimeSample Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Core module for ArangoDB Java Driver
package com.arangodb.model;
import java.util.Objects;
/**
* Represents an observed value of the server queue latency, as returned from the "X-Arango-Queue-Time-Seconds" response
* header.
* This header contains the most recent request (de)queuing time (in seconds) as tracked by the server’s scheduler.
*
* @author Michele Rastelli
* @see API Documentation
*/
public final class QueueTimeSample {
/**
* Unix-timestamp in milliseconds, recorded at client side.
*/
public final long timestamp;
/**
* Observed value.
*/
public final double value;
public QueueTimeSample(long timestamp, double value) {
this.timestamp = timestamp;
this.value = value;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
QueueTimeSample that = (QueueTimeSample) o;
return timestamp == that.timestamp && Double.compare(that.value, value) == 0;
}
@Override
public int hashCode() {
return Objects.hash(timestamp, value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy