Interface LatencyTracker (6.119.0)
Stay organized with collections
Save and categorize content based on your preferences.
public interface LatencyTracker
Interface for tracking latency scores of Spanner servers.
Implementations must be thread-safe as instances may be shared across multiple concurrent
operations.
Methods
getScore()
public abstract double getScore()
Returns the current latency score.
| Returns |
| Type |
Description |
double |
the latency score, where lower is better.
|
recordError(Duration penalty)
public abstract void recordError(Duration penalty)
Records an error and applies a latency penalty.
| Parameter |
| Name |
Description |
penalty |
Duration
the penalty to apply.
|
update(Duration latency)
public abstract void update(Duration latency)
Updates the latency score with a new observation.
| Parameter |
| Name |
Description |
latency |
Duration
the observed latency.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-07-31 UTC.
[null,null,["Last updated 2026-07-31 UTC."],[],[]]