Package org.ametys.cms.indexing.solr
Record Class IndexationResult
java.lang.Object
java.lang.Record
org.ametys.cms.indexing.solr.IndexationResult
- Record Components:
successCount- number of successful taskserrorCount- number of fail tasks
Record to return indexation results: success and error count.
-
Constructor Summary
ConstructorsConstructorDescriptionIndexationResult(int successCount, int errorCount) Creates an instance of aIndexationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of theerrorCountrecord component.static IndexationResultfromTasks(Collection<Future<Void>> tasks, org.slf4j.Logger logger) Check each future of launched tasks and count success and errors.booleanTest if the indexation had errors.final inthashCode()Returns a hash code value for this object.intReturns the value of thesuccessCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
IndexationResult
Creates an instance of aIndexationResultrecord class.- Parameters:
successCount- the value for thesuccessCountrecord componenterrorCount- the value for theerrorCountrecord component
-
-
Method Details
-
hasErrors
Test if the indexation had errors.- Returns:
trueif the indexation had errors,falseotherwise.
-
fromTasks
Check each future of launched tasks and count success and errors.- Parameters:
tasks- The tasks launched in the executor servicelogger- The logger- Returns:
- The indexation result
-
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
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. All components in this record class are compared with '=='. -
successCount
Returns the value of thesuccessCountrecord component.- Returns:
- the value of the
successCountrecord component
-
errorCount
Returns the value of theerrorCountrecord component.- Returns:
- the value of the
errorCountrecord component
-