Enum LatencyContext

  • All Implemented Interfaces:
    Serializable, Comparable<LatencyContext>

    public enum LatencyContext
    extends Enum<LatencyContext>
    Defines the latency measurement contexts used by KDC.

    Each context identifies an ordered collection of latency metrics associated with a particular communication operation.

    Contexts distinguish between synchronous and asynchronous communication, as well as sending and receiving operations.

    Advanced users may inspect the metrics associated with a context to analyze individual stages of agent communication and processing.

    Author:
    Charles B. Kozoyed
    See Also:
    LatencyMetric, LatencyRecord
    • Enum Constant Detail

      • SEND_ASYNC

        public static final LatencyContext SEND_ASYNC
        Latency metrics associated with sending an agent asynchronously.

        Includes agent serialization and transmission.

      • SEND_SYNC

        public static final LatencyContext SEND_SYNC
        Latency metrics associated with a synchronous agent round trip.

        Includes agent serialization and transmission, receiver-side processing, and local reply waiting and reception.

      • RECEIVE_ASYNC

        public static final LatencyContext RECEIVE_ASYNC
        Latency metrics associated with receiving and processing an asynchronous agent.

        Includes agent reception, deserialization, queueing, and execution of the agent's visit method.

      • RECEIVE_SYNC

        public static final LatencyContext RECEIVE_SYNC
        Latency metrics associated with receiving and processing a synchronous agent.

        Includes agent reception, deserialization, queueing, execution of the agent's visit method, and reply serialization and transmission.

    • Method Detail

      • values

        public static LatencyContext[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (LatencyContext c : LatencyContext.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static LatencyContext valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getMetrics

        public List<LatencyMetric> getMetrics()
        Returns the ordered latency metrics associated with this context.

        The returned list is unmodifiable. Its ordering corresponds to the positions of timestamps stored in the associated LatencyRecord.

        Advanced users may iterate over these metrics alongside the start and stop timestamp arrays to examine individual processing stages.

        Returns:
        an unmodifiable list of latency metrics
        See Also:
        LatencyRecord.getStartTimeLine(), LatencyRecord.getStopTimeLine()