Package org.aksw.iguana.cc.worker
Record Class HttpWorker.ExecutionStats
java.lang.Object
java.lang.Record
org.aksw.iguana.cc.worker.HttpWorker.ExecutionStats
- Enclosing class:
- HttpWorker
public static record HttpWorker.ExecutionStats(int queryID, Instant startTime, Duration duration, Optional<Integer> httpStatusCode, OptionalLong contentLength, OptionalLong responseBodyHash, Optional<Exception> error)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionExecutionStats(int queryID, Instant startTime, Duration duration, Optional<Integer> httpStatusCode, OptionalLong contentLength, OptionalLong responseBodyHash, Optional<Exception> error) Creates an instance of aExecutionStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecontentLengthrecord component.duration()Returns the value of thedurationrecord component.endState()final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehttpStatusCoderecord component.booleanintqueryID()Returns the value of thequeryIDrecord component.Returns the value of theresponseBodyHashrecord component.Returns the value of thestartTimerecord component.booleanbooleantimeout()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ExecutionStats
public ExecutionStats(int queryID, Instant startTime, Duration duration, Optional<Integer> httpStatusCode, OptionalLong contentLength, OptionalLong responseBodyHash, Optional<Exception> error) Creates an instance of aExecutionStatsrecord class.- Parameters:
queryID- the value for thequeryIDrecord componentstartTime- the value for thestartTimerecord componentduration- the value for thedurationrecord componenthttpStatusCode- the value for thehttpStatusCoderecord componentcontentLength- the value for thecontentLengthrecord componentresponseBodyHash- the value for theresponseBodyHashrecord componenterror- the value for theerrorrecord component
-
-
Method Details
-
endState
-
completed
public boolean completed() -
successful
public boolean successful() -
timeout
public boolean timeout() -
httpError
public boolean httpError() -
miscellaneousException
public boolean miscellaneousException() -
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 '=='. -
queryID
public int queryID()Returns the value of thequeryIDrecord component.- Returns:
- the value of the
queryIDrecord component
-
startTime
Returns the value of thestartTimerecord component.- Returns:
- the value of the
startTimerecord component
-
duration
Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
httpStatusCode
Returns the value of thehttpStatusCoderecord component.- Returns:
- the value of the
httpStatusCoderecord component
-
contentLength
Returns the value of thecontentLengthrecord component.- Returns:
- the value of the
contentLengthrecord component
-
responseBodyHash
Returns the value of theresponseBodyHashrecord component.- Returns:
- the value of the
responseBodyHashrecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-