Package jline.streaming
Class StreamingOptions
java.lang.Object
jline.streaming.StreamingOptions
- All Implemented Interfaces:
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumStreaming mode enumeration.static enumTransport type enumeration. -
Field Summary
FieldsModifier and TypeFieldDescriptionReceiver endpoint (default: localhost:8080/metrics for HTTP, localhost:4317 for GRPC)booleanIf true, throw an exception when connection fails instead of falling back to dry-run modebooleanWhether to include arrival rate metrics (ArvR)booleanWhether to include queue length metrics (QLen)booleanWhether to include response time metrics (RespT)booleanWhether to include throughput metrics (Tput)booleanWhether to include utilization metrics (Util)Streaming mode: SAMPLED or TIME_WINDOWintFor SAMPLED mode: push every N simulation eventsService name to identify this simulation in line-estdoubleFor TIME_WINDOW mode: aggregate over X seconds before pushingTransport type: HTTP (recommended) or GRPC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet the OTLP receiver endpoint.failOnConnectionError(boolean fail) Set whether to fail on connection error or fall back to dry-run mode.getHost()Get the host from the endpoint.intgetPort()Get the port from the endpoint.includeArrivalRate(boolean include) Enable or disable arrival rate metrics.includeQueueLength(boolean include) Enable or disable queue length metrics.includeResponseTime(boolean include) Enable or disable response time metrics.includeThroughput(boolean include) Enable or disable throughput metrics.includeUtilization(boolean include) Enable or disable utilization metrics.Set the streaming mode.String[]Parse endpoint into host and port.sampleFrequency(int frequency) Set the sample frequency for SAMPLED mode.serviceName(String name) Set the service name for identification in line-est.timeWindowSeconds(double seconds) Set the time window duration for TIME_WINDOW mode.transport(StreamingOptions.TransportType transport) Set the transport type.
-
Field Details
-
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 sampleFrequencyFor SAMPLED mode: push every N simulation events -
timeWindowSeconds
public double timeWindowSecondsFor TIME_WINDOW mode: aggregate over X seconds before pushing -
serviceName
Service name to identify this simulation in line-est -
includeQueueLength
public boolean includeQueueLengthWhether to include queue length metrics (QLen) -
includeUtilization
public boolean includeUtilizationWhether to include utilization metrics (Util) -
includeThroughput
public boolean includeThroughputWhether to include throughput metrics (Tput) -
includeResponseTime
public boolean includeResponseTimeWhether to include response time metrics (RespT) -
includeArrivalRate
public boolean includeArrivalRateWhether to include arrival rate metrics (ArvR) -
failOnConnectionError
public boolean failOnConnectionErrorIf 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
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
Set the sample frequency for SAMPLED mode.- Parameters:
frequency- Push every N simulation events- Returns:
- this instance for method chaining
-
timeWindowSeconds
Set the time window duration for TIME_WINDOW mode.- Parameters:
seconds- Aggregate duration in seconds- Returns:
- this instance for method chaining
-
serviceName
Set the service name for identification in line-est.- Parameters:
name- Service name- Returns:
- this instance for method chaining
-
includeQueueLength
Enable or disable queue length metrics.- Parameters:
include- true to include, false to exclude- Returns:
- this instance for method chaining
-
includeUtilization
Enable or disable utilization metrics.- Parameters:
include- true to include, false to exclude- Returns:
- this instance for method chaining
-
includeThroughput
Enable or disable throughput metrics.- Parameters:
include- true to include, false to exclude- Returns:
- this instance for method chaining
-
includeResponseTime
Enable or disable response time metrics.- Parameters:
include- true to include, false to exclude- Returns:
- this instance for method chaining
-
includeArrivalRate
Enable or disable arrival rate metrics.- Parameters:
include- true to include, false to exclude- Returns:
- this instance for method chaining
-
failOnConnectionError
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
Set the transport type.- Parameters:
transport- HTTP (recommended) or GRPC- Returns:
- this instance for method chaining
-
parseEndpoint
Parse endpoint into host and port.- Returns:
- array with [host, port] where port is an int as 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
-