Class StreamingOptions

java.lang.Object
jline.streaming.StreamingOptions
All Implemented Interfaces:
Serializable

public class StreamingOptions extends Object implements Serializable
Configuration options for SSA streaming to metrics receiver. Supports two modes: sampled (push every N events) or time-window (push averaged metrics over duration). Supports two transports: HTTP (recommended, works everywhere) or GRPC (requires compatible JVM).
See Also:
  • Field Details

    • endpoint

      public String endpoint
      Receiver endpoint (default: localhost:8080/metrics for HTTP, localhost:4317 for GRPC)
    • transport

      Transport type: HTTP (recommended) or GRPC
    • mode

      Streaming mode: SAMPLED or TIME_WINDOW
    • sampleFrequency

      public int sampleFrequency
      For SAMPLED mode: push every N simulation events
    • timeWindowSeconds

      public double timeWindowSeconds
      For TIME_WINDOW mode: aggregate over X seconds before pushing
    • serviceName

      public String serviceName
      Service name to identify this simulation in line-est
    • includeQueueLength

      public boolean includeQueueLength
      Whether to include queue length metrics (QLen)
    • includeUtilization

      public boolean includeUtilization
      Whether to include utilization metrics (Util)
    • includeThroughput

      public boolean includeThroughput
      Whether to include throughput metrics (Tput)
    • includeResponseTime

      public boolean includeResponseTime
      Whether to include response time metrics (RespT)
    • includeArrivalRate

      public boolean includeArrivalRate
      Whether to include arrival rate metrics (ArvR)
    • failOnConnectionError

      public boolean failOnConnectionError
      If true, throw an exception when connection fails instead of falling back to dry-run mode
  • Constructor Details

    • StreamingOptions

      public StreamingOptions()
      Default constructor with default settings.
  • Method Details

    • endpoint

      public StreamingOptions endpoint(String endpoint)
      Set the OTLP receiver endpoint.
      Parameters:
      endpoint - The endpoint in format "host:port"
      Returns:
      this instance for method chaining
    • mode

      Set the streaming mode.
      Parameters:
      mode - SAMPLED or TIME_WINDOW
      Returns:
      this instance for method chaining
    • sampleFrequency

      public StreamingOptions sampleFrequency(int frequency)
      Set the sample frequency for SAMPLED mode.
      Parameters:
      frequency - Push every N simulation events
      Returns:
      this instance for method chaining
    • timeWindowSeconds

      public StreamingOptions timeWindowSeconds(double seconds)
      Set the time window duration for TIME_WINDOW mode.
      Parameters:
      seconds - Aggregate duration in seconds
      Returns:
      this instance for method chaining
    • serviceName

      public StreamingOptions serviceName(String name)
      Set the service name for identification in line-est.
      Parameters:
      name - Service name
      Returns:
      this instance for method chaining
    • includeQueueLength

      public StreamingOptions includeQueueLength(boolean include)
      Enable or disable queue length metrics.
      Parameters:
      include - true to include, false to exclude
      Returns:
      this instance for method chaining
    • includeUtilization

      public StreamingOptions includeUtilization(boolean include)
      Enable or disable utilization metrics.
      Parameters:
      include - true to include, false to exclude
      Returns:
      this instance for method chaining
    • includeThroughput

      public StreamingOptions includeThroughput(boolean include)
      Enable or disable throughput metrics.
      Parameters:
      include - true to include, false to exclude
      Returns:
      this instance for method chaining
    • includeResponseTime

      public StreamingOptions includeResponseTime(boolean include)
      Enable or disable response time metrics.
      Parameters:
      include - true to include, false to exclude
      Returns:
      this instance for method chaining
    • includeArrivalRate

      public StreamingOptions includeArrivalRate(boolean include)
      Enable or disable arrival rate metrics.
      Parameters:
      include - true to include, false to exclude
      Returns:
      this instance for method chaining
    • failOnConnectionError

      public StreamingOptions failOnConnectionError(boolean fail)
      Set whether to fail on connection error or fall back to dry-run mode.
      Parameters:
      fail - true to throw exception on connection error, false for dry-run mode
      Returns:
      this instance for method chaining
    • transport

      public StreamingOptions transport(StreamingOptions.TransportType transport)
      Set the transport type.
      Parameters:
      transport - HTTP (recommended) or GRPC
      Returns:
      this instance for method chaining
    • parseEndpoint

      public String[] parseEndpoint()
      Parse endpoint into host and port.
      Returns:
      array with [host, port] where port is an int as String
    • getHost

      public String getHost()
      Get the host from the endpoint.
      Returns:
      host part of endpoint
    • getPort

      public int getPort()
      Get the port from the endpoint.
      Returns:
      port number