Package dev.tripswitch
Record Class SDKStats
java.lang.Object
java.lang.Record
dev.tripswitch.SDKStats
- Record Components:
droppedSamples- number of samples dropped due to full bufferbufferSize- current sample buffer sizesseConnected- whether SSE connection is activesseReconnects- number of SSE reconnection attemptslastSuccessfulFlush- time of last successful flushlastSseEvent- time of last SSE event receivedflushFailures- number of batches dropped after retry exhaustioncachedBreakers- number of breakers in local state cache
public record SDKStats(long droppedSamples, int bufferSize, boolean sseConnected, long sseReconnects, Instant lastSuccessfulFlush, Instant lastSseEvent, long flushFailures, int cachedBreakers)
extends Record
Health metrics snapshot for the SDK.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebufferSizerecord component.intReturns the value of thecachedBreakersrecord component.longReturns the value of thedroppedSamplesrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theflushFailuresrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thelastSseEventrecord component.Returns the value of thelastSuccessfulFlushrecord component.booleanReturns the value of thesseConnectedrecord component.longReturns the value of thesseReconnectsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SDKStats
public SDKStats(long droppedSamples, int bufferSize, boolean sseConnected, long sseReconnects, Instant lastSuccessfulFlush, Instant lastSseEvent, long flushFailures, int cachedBreakers) Creates an instance of aSDKStatsrecord class.- Parameters:
droppedSamples- the value for thedroppedSamplesrecord componentbufferSize- the value for thebufferSizerecord componentsseConnected- the value for thesseConnectedrecord componentsseReconnects- the value for thesseReconnectsrecord componentlastSuccessfulFlush- the value for thelastSuccessfulFlushrecord componentlastSseEvent- the value for thelastSseEventrecord componentflushFailures- the value for theflushFailuresrecord componentcachedBreakers- the value for thecachedBreakersrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
droppedSamples
public long droppedSamples()Returns the value of thedroppedSamplesrecord component.- Returns:
- the value of the
droppedSamplesrecord component
-
bufferSize
public int bufferSize()Returns the value of thebufferSizerecord component.- Returns:
- the value of the
bufferSizerecord component
-
sseConnected
public boolean sseConnected()Returns the value of thesseConnectedrecord component.- Returns:
- the value of the
sseConnectedrecord component
-
sseReconnects
public long sseReconnects()Returns the value of thesseReconnectsrecord component.- Returns:
- the value of the
sseReconnectsrecord component
-
lastSuccessfulFlush
Returns the value of thelastSuccessfulFlushrecord component.- Returns:
- the value of the
lastSuccessfulFlushrecord component
-
lastSseEvent
Returns the value of thelastSseEventrecord component.- Returns:
- the value of the
lastSseEventrecord component
-
flushFailures
public long flushFailures()Returns the value of theflushFailuresrecord component.- Returns:
- the value of the
flushFailuresrecord component
-
cachedBreakers
public int cachedBreakers()Returns the value of thecachedBreakersrecord component.- Returns:
- the value of the
cachedBreakersrecord component
-