Class ServerStats

  • Direct Known Subclasses:
    AutoValue_ServerStats

    @Immutable
    public abstract class ServerStats
    extends java.lang.Object
    A representation of stats measured on the server side.
    Since:
    0.16
    • Constructor Summary

      Constructors 
      Constructor Description
      ServerStats()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static ServerStats create​(long lbLatencyNs, long serviceLatencyNs, byte traceOption)
      Creates new ServerStats from specified parameters.
      abstract long getLbLatencyNs()
      Returns Load Balancer latency, a latency observed at Load Balancer.
      abstract long getServiceLatencyNs()
      Returns Service latency, a latency observed at Server.
      abstract byte getTraceOption()
      Returns Trace options, a set of bits indicating properties of trace.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServerStats

        ServerStats()
    • Method Detail

      • getLbLatencyNs

        public abstract long getLbLatencyNs()
        Returns Load Balancer latency, a latency observed at Load Balancer.
        Returns:
        Load Balancer latency in nanoseconds.
        Since:
        0.16
      • getServiceLatencyNs

        public abstract long getServiceLatencyNs()
        Returns Service latency, a latency observed at Server.
        Returns:
        Service latency in nanoseconds.
        Since:
        0.16
      • getTraceOption

        public abstract byte getTraceOption()
        Returns Trace options, a set of bits indicating properties of trace.
        Returns:
        Trace options a set of bits indicating properties of trace.
        Since:
        0.16
      • create

        public static ServerStats create​(long lbLatencyNs,
                                         long serviceLatencyNs,
                                         byte traceOption)
        Creates new ServerStats from specified parameters.
        Parameters:
        lbLatencyNs - Represents request processing latency observed on Load Balancer. It is measured in nanoseconds. Must not be less than 0. Value of 0 represents that the latency is not measured.
        serviceLatencyNs - Represents request processing latency observed on Server. It is measured in nanoseconds. Must not be less than 0. Value of 0 represents that the latency is not measured.
        traceOption - Represents set of bits to indicate properties of trace. Currently it used only the least signification bit to represent sampling of the request on the server side. Other bits are ignored.
        Returns:
        new ServerStats with specified fields.
        Throws:
        java.lang.IllegalArgumentException - if the arguments are out of range.
        Since:
        0.16