Package com.tnsai.coordination
Record Class ScatterGather.ScatterResults
java.lang.Object
java.lang.Record
com.tnsai.coordination.ScatterGather.ScatterResults
- Enclosing class:
ScatterGather
public static record ScatterGather.ScatterResults(List<ScatterGather.AgentResponse> responses, long totalDurationMs, int totalAgents)
extends Record
Aggregated responses from scatter operation.
-
Constructor Summary
ConstructorsConstructorDescriptionScatterResults(List<ScatterGather.AgentResponse> responses, long totalDurationMs, int totalAgents) Creates an instance of aScatterResultsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.failed()fastest()final inthashCode()Returns a hash code value for this object.Returns the value of theresponsesrecord component.doublefinal StringtoString()Returns a string representation of this record class.intReturns the value of thetotalAgentsrecord component.longReturns the value of thetotalDurationMsrecord component.
-
Constructor Details
-
ScatterResults
public ScatterResults(List<ScatterGather.AgentResponse> responses, long totalDurationMs, int totalAgents) Creates an instance of aScatterResultsrecord class.- Parameters:
responses- the value for theresponsesrecord componenttotalDurationMs- the value for thetotalDurationMsrecord componenttotalAgents- the value for thetotalAgentsrecord component
-
-
Method Details
-
successful
-
failed
-
responseTexts
-
fastest
-
successRate
public double successRate() -
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 '=='. -
responses
Returns the value of theresponsesrecord component.- Returns:
- the value of the
responsesrecord component
-
totalDurationMs
public long totalDurationMs()Returns the value of thetotalDurationMsrecord component.- Returns:
- the value of the
totalDurationMsrecord component
-
totalAgents
public int totalAgents()Returns the value of thetotalAgentsrecord component.- Returns:
- the value of the
totalAgentsrecord component
-