Record Class GrowingViewState
java.lang.Object
java.lang.Record
com.vaadin.observability.micrometer.insights.GrowingViewState
- Record Components:
viewClass- fully qualified class name of the viewfield- the field, asDeclaringClass.fieldNamewith the declaring class fully qualifiedroute- the view's route template, ornullwhen it has noneelements- elements held at the latest measurementfirstElements- elements held when the run of growth begangrowthSamples- measurements at which the collection had grown, since it last shrank or was first seenfirstSeen- when the run of growth beganlastGrew- the latest measurement that found it grownsessionId- the session, hashed unless insight details are enableduiId- the UI within the session
public record GrowingViewState(String viewClass, String field, @Nullable String route, int elements, int firstElements, int growthSamples, Instant firstSeen, Instant lastGrew, @Nullable String sessionId, int uiId)
extends Record
A collection one view instance keeps in a field, which has grown at every
measurement of its UI that saw it change — the shape of a view accumulating
what it loads instead of replacing it.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintelements()Returns the value of theelementsrecord component.final booleanIndicates whether some other object is "equal to" this one.field()Returns the value of thefieldrecord component.intReturns the value of thefirstElementsrecord component.Returns the value of thefirstSeenrecord component.intReturns the value of thegrowthSamplesrecord component.final inthashCode()Returns a hash code value for this object.lastGrew()Returns the value of thelastGrewrecord component.@Nullable Stringroute()Returns the value of therouterecord component.@Nullable StringReturns the value of thesessionIdrecord component.static @Nullable StringsessionIdOf(@Nullable com.vaadin.flow.component.UI ui, boolean details) The session id to report for a UI: reduced to a short one-way hash unless detail is enabled, as for every other insight.final StringtoString()Returns a string representation of this record class.intuiId()Returns the value of theuiIdrecord component.Returns the value of theviewClassrecord component.
-
Constructor Details
-
GrowingViewState
public GrowingViewState(String viewClass, String field, @Nullable String route, int elements, int firstElements, int growthSamples, Instant firstSeen, Instant lastGrew, @Nullable String sessionId, int uiId) Creates an instance of aGrowingViewStaterecord class.- Parameters:
viewClass- the value for theviewClassrecord componentfield- the value for thefieldrecord componentroute- the value for therouterecord componentelements- the value for theelementsrecord componentfirstElements- the value for thefirstElementsrecord componentgrowthSamples- the value for thegrowthSamplesrecord componentfirstSeen- the value for thefirstSeenrecord componentlastGrew- the value for thelastGrewrecord componentsessionId- the value for thesessionIdrecord componentuiId- the value for theuiIdrecord component
-
-
Method Details
-
sessionIdOf
public static @Nullable String sessionIdOf(@Nullable com.vaadin.flow.component.UI ui, boolean details) The session id to report for a UI: reduced to a short one-way hash unless detail is enabled, as for every other insight.- Parameters:
ui- the UI, may benulldetails- whether the application opted in to sensitive detail- Returns:
- the raw or hashed session id, or
nullwhen there is none
-
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 '=='. -
viewClass
Returns the value of theviewClassrecord component.- Returns:
- the value of the
viewClassrecord component
-
field
Returns the value of thefieldrecord component.- Returns:
- the value of the
fieldrecord component
-
route
Returns the value of therouterecord component.- Returns:
- the value of the
routerecord component
-
elements
public int elements()Returns the value of theelementsrecord component.- Returns:
- the value of the
elementsrecord component
-
firstElements
public int firstElements()Returns the value of thefirstElementsrecord component.- Returns:
- the value of the
firstElementsrecord component
-
growthSamples
public int growthSamples()Returns the value of thegrowthSamplesrecord component.- Returns:
- the value of the
growthSamplesrecord component
-
firstSeen
Returns the value of thefirstSeenrecord component.- Returns:
- the value of the
firstSeenrecord component
-
lastGrew
Returns the value of thelastGrewrecord component.- Returns:
- the value of the
lastGrewrecord component
-
sessionId
Returns the value of thesessionIdrecord component.- Returns:
- the value of the
sessionIdrecord component
-
uiId
public int uiId()Returns the value of theuiIdrecord component.- Returns:
- the value of the
uiIdrecord component
-