Record Class EventStreamDiagnostics
java.lang.Object
java.lang.Record
com.inductiveautomation.eventstream.EventStreamDiagnostics
- Record Components:
project- Project Event Stream belongs topath- Path to Event Stream resourcestate- Current state of Event StreamstageDiagnostics- Map of stage name toStageDiagnosticspreviewOutput- Encoded output of the stage the run asked to preview — or the reason there is none — andnullwhen the run asked to preview nothing.
public record EventStreamDiagnostics(String project, String path, String state, Map<String, StageDiagnostics> stageDiagnostics, @Nullable EventPreview previewOutput)
extends Record
Contains diagnostics data for an Event Stream and all it's included stages
-
Constructor Summary
ConstructorsConstructorDescriptionEventStreamDiagnostics(String project, String path, String state, Map<String, StageDiagnostics> stageDiagnostics) Diagnostics for a run that previewed nothing.EventStreamDiagnostics(String project, String path, String state, Map<String, StageDiagnostics> stageDiagnostics, @Nullable EventPreview previewOutput) Creates an instance of aEventStreamDiagnosticsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable StageDiagnosticsgetStageDiagnostics(String stageName) Get theStageDiagnosticsfor a specific stagefinal inthashCode()Returns a hash code value for this object.mostRecentErrors(int count) Combines the errors from all stages and returns the most recentpath()Returns the value of thepathrecord component.@Nullable EventPreviewReturns the value of thepreviewOutputrecord component.project()Returns the value of theprojectrecord component.Returns the value of thestageDiagnosticsrecord component.state()Returns the value of thestaterecord component.toString()Returns a string representation of this record class.withPreviewOutput(EventPreview previewOutput) Returns a copy of these diagnostics carrying the outcome of a preview.
-
Constructor Details
-
EventStreamDiagnostics
-
EventStreamDiagnostics
public EventStreamDiagnostics(String project, String path, String state, Map<String, StageDiagnostics> stageDiagnostics, @Nullable EventPreview previewOutput) Creates an instance of aEventStreamDiagnosticsrecord class.- Parameters:
project- the value for theprojectrecord componentpath- the value for thepathrecord componentstate- the value for thestaterecord componentstageDiagnostics- the value for thestageDiagnosticsrecord componentpreviewOutput- the value for thepreviewOutputrecord component
-
-
Method Details
-
mostRecentErrors
Combines the errors from all stages and returns the most recent- Parameters:
count- Max amount of errors to return, up to a maximum ofEventStreamConstants.ERROR_COUNT_MAX.- Returns:
- Errors sorted from most recent to oldest
-
getStageDiagnostics
Get theStageDiagnosticsfor a specific stage- Parameters:
stageName- Name of the stage- Returns:
- StageDiagnostics or null if not found
-
withPreviewOutput
Returns a copy of these diagnostics carrying the outcome of a preview.- Parameters:
previewOutput- outcome of encoding the previewed stage's output
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
project
-
path
-
state
-
stageDiagnostics
Returns the value of thestageDiagnosticsrecord component.- Returns:
- the value of the
stageDiagnosticsrecord component
-
previewOutput
Returns the value of thepreviewOutputrecord component.- Returns:
- the value of the
previewOutputrecord component
-